2013-07-22 53 views
0

我是新的开发AR随着POI如何使用Wikitude添加POI?

我使用wikitude用于开发AR.I从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我的应用程序不显示POIs。

我的问题
1.如何在我的应用程序

对不起!.I'm做的POI显示不好英语

回答

0

确保您的设备已获得一个位置。要查看它是否获得位置,您可以在“onLocationChangedFn函数”中添加以下行:

alert('Location received');

收到位置后,应该弹出消息。