我是开发人员AR和POI的新手
我正在为开发者‘m使用维基百科。我确实关注HERE
js文件中的以下代码:
var World = {
loaded: false,
init: function initFn() {
AR.context.onLocationChanged = World.onLocationChanged;
},
onLocationChanged: function onLocationChangedFn(latitude, longitude, altitude, accuracy) {
AR.context.onLocationChanged = null;
World.createMarkerAtLocation(latitude + 0.01, longitude - 0.0005, altitude - 0.06);
},
createMarkerAtLocation: function createMarkerAtLocationFn(latitude, longitude, altitude) {
var markerLocation = new AR.GeoLocation(latitude, longitude, altitude);
var markerDrawable = new AR.ImageDrawable(World.markerDrawable, 3);
var markerObject = new AR.GeoObject(markerLocation, {
drawables: {
cam: markerDrawable
}
});
},
worldLoaded: function worldLoadedFn() {
document.body.removeChild(document.getElementById('loadingMessage'));
}
};
World.init();我在我的android.But中运行,我的应用程序没有显示POI。
我的问题
中显示相关内容
打扰一下!我的英语不好
发布于 2013-07-23 21:51:01
确保您的设备正在获取位置。要查看它是否获得一个位置,可以在"function onLocationChangedFn“中添加以下代码行
alert(‘收到位置’);
一旦接收到位置,就会弹出一条消息。
https://stackoverflow.com/questions/17785578
复制相似问题