Wikitude SDK:如何在其中放置自定义GPS坐标?

时间:2018-11-27 04:28:23

标签: java android android-studio wikitude wikitude-sdk

我正在使用Android的Wikitude SDK(AR应用程序),并且当前已随机设置标记。

   /* Location updates, fired every time you call architectView.setLocation() in native environment. */
locationChanged: function locationChangedFn(lat, lon, alt, acc) {

    /*
        The custom function World.onLocationChanged checks with the flag World.initiallyLoadedData if the
        function was already called. With the first call of World.onLocationChanged an object that contains geo
        information will be created which will be later used to create a marker using the
        World.loadPoisFromJsonData function.
    */
    if (!World.initiallyLoadedData) {
        /* Creates a poi object with a random location near the user's location. */
        var poiData = {
            "id": 1,
            "longitude": (lon + (Math.random() / 5 - 0.1)),
            "latitude": (lat + (Math.random() / 5 - 0.1)),
            "altitude": 100.0
        };

        World.loadPoisFromJsonData(poiData);
        World.initiallyLoadedData = true;
    }
}

我试图用这样的坐标简单地替换数学部分

        "longitude": (lon + (-80.624594)),
        "latitude": (lat + (40.366950)),

那行不通或

        "longitude": (-80.624594),
        "latitude": (40.366950),

        "longitude": (lon = -80.624594),
        "latitude": (lat = 40.366950),

但无济于事。任何帮助/提示将不胜感激。

谢谢

0 个答案:

没有答案