2013-07-22 55 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');

收到位置後,應該彈出消息。