我正在使用Android的Wikitude SDK(AR应用程序),并且当前已随机设置标记。
/* Location updates, fired every time you call architectView.setLocation() in native environment. */
locationChanged: function locationChangedFn(lat, lon, alt, acc) {
/*
The custom function World.onLocationChanged checks with the flag World.initiallyLoadedData if the
function was already called. With the first call of World.onLocationChanged an object that contains geo
information will be created which will be later used to create a marker using the
World.loadPoisFromJsonData function.
*/
if (!World.initiallyLoadedData) {
/* Creates a poi object with a random location near the user's location. */
var poiData = {
"id": 1,
"longitude": (lon + (Math.random() / 5 - 0.1)),
"latitude": (lat + (Math.random() / 5 - 0.1)),
"altitude": 100.0
};
World.loadPoisFromJsonData(poiData);
World.initiallyLoadedData = true;
}
}
我试图用这样的坐标简单地替换数学部分
"longitude": (lon + (-80.624594)),
"latitude": (lat + (40.366950)),
那行不通或
"longitude": (-80.624594),
"latitude": (40.366950),
或
"longitude": (lon = -80.624594),
"latitude": (lat = 40.366950),
但无济于事。任何帮助/提示将不胜感激。
谢谢