【问题标题】:How to add POI with Wikitude?如何使用 Wikitude 添加兴趣点?
【发布时间】:2013-07-22 10:47:07
【问题描述】:

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

我正在为开发人员 AR 使用 wikiitude。我确实关注 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 中运行。但我的应用没有显示 POI。

我的问题
1. 我的应用中POI显示是怎么做的

对不起!我英语不好

【问题讨论】:

    标签: wikitude


    【解决方案1】:

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

    alert('收到位置');

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

    【讨论】:

      猜你喜欢
      • 2018-01-18
      • 2015-11-12
      • 2015-12-10
      • 2021-08-17
      • 1970-01-01
      • 1970-01-01
      • 2017-04-29
      • 2012-02-04
      • 2012-04-25
      相关资源
      最近更新 更多