Wikitude SDK: Как мне добавить сюда свои пользовательские GPS-координаты? - PullRequest
0 голосов
/ 27 ноября 2018

Я использую Wikitude SDK для Android (приложение 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),

Но безрезультатно.Любая помощь / советы будут оценены.

Спасибо

...