0

我是开发人员 AR With POI 的新手

我正在为开发人员 AR 使用 wikiitude。我确实从这里关注

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 中运行。但我的应用程序没有显示 POI。

我的问题
1. 如何在我的应用程序中显示 POI

对不起!我英语不好

4

1 回答 1

0

确保您的设备正在获取位置信息。要查看它是否获得位置,您可以在“function onLocationChangedFn”中添加以下行

alert('收到位置');

一旦收到位置,这应该会弹出一条消息。

于 2013-07-23T13:51:01.087 回答