0

I'm new for developer AR With POI

I'm using wikitude for developer AR.I do follow from HERE

This code in js file:

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();

And I Run in my android.But my app is not show POIs.

My Question
1. How do I did for POI show in my apps

Excuse me!.I'm not good English

1 Answers1

0

Make sure that your device is getting an location. To see if it gets a location you can add the following lines inside the "function onLocationChangedFn"

alert('Location received');

This should pop up a message once a location has been received.

wulfgeng
  • 585
  • 4
  • 8