Start a new topic

How to create POI?

Hi,

I'm currently creating my app with Wikitude so I followed the official tutorial.

So, there's something I didn't found: how to create my own POI. I tried to add it in source code, but I feel like I'm doing it wrong.

Thanks for your answer.

Theo

1 Comment

Hello Theo,

Based on our documentation:

On 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.

locationChanged: function locationChangedFn(lat, lon, alt, acc) {
    // request data if not already present
    if (!World.initiallyLoadedData) {
        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;
    }
}

 


You can also find additional information on our documentation regarding how to retrieve pois.

In addition, if you search on our forum you will find posts regarding how to add pois to your app.

Thanks
Eva

 

Login or Signup to post a comment