Start a new topic

Add/Remove POI objects in view

Add/Remove POI objects in view
1 Comment


Hi everyone,

Im hoping you might be able to help me out with an issue im having rendering POI objects.  I am developing an iOS app using Wikitude SDK and using the SimpleARBrowser as a good base point to develop my aug reality app.  I have extended out the ARArchitectBrowser.html file to update POI objects in the surrounding area to user in minute intervals.  Every minute i destroy all objects set in jsonObject array and call the function newData() to render all objects again.  The code below will better demonstrate this.

What is happening on first run through function all objects are rendered nicely.  On subsequent calls the objects are being destroyed but the call to newData() does not render new objects on screen leaving the aug view blank.  Am i performing the destroy function correctly?? any help would be apprecaited

 

function loadData(jsonData) {

                var i = 0;

                var j = 0;                

                while(i < jsonObject.length) {

                    j = 0;

                    while(j < jsonObject.poiObj.drawables.cam.length) {

                        jsonObject.poiObj.drawables.cam.destroy();

                        j++;

                    }

                    jsonObject.poiObj.destroy();

                }

                AR.radar.enabled = true;

                jsonObject = JSON.parse(jsonData);

                newData();

            }

 
Login or Signup to post a comment