Start a new topic

Location-Based AR questions (database,markers)



We're creating a location-based AR android application using javaScript API with android studio,

and we have a few questions that we struggled to find an answer to.


1- how can we retrieve the data from the remote database (we're using 000webhost) then send it to the marker information to javascript.


2- is it possible to make the markers with different images (marker image) or they should all have the same icon?


3- can I call a java activity from javascript when the marker is clicked?

1 Comment

Hello Doaa,

There is a documentation section that describes how you can retrieve the data if they are stored locally or in a webservice. You can find more information here You can also define custom visual representation of your POIs, that's no problem. You may e.g. define a mapping between type and idle/selected marker. Create one ImageDrawable per type in your experience code's init block. e.g.


World.markerImageRessources = {"idle": {}, "selected": {}};
World.markerImageRessources.idle["typeA"] = new AR.ImageRessource("")
World.markerImageRessources.selected["typeA"] = new AR.ImageRessource("")
World.markerImageRessources.idle["typeB"] = new AR.ImageRessource("")
World.markerImageRessources.selected["typeB"] = new AR.ImageRessource("")

// that way you can then call, e.g.
this.markerDrawable_selected = new AR.ImageDrawable(World.markerImageRessources.selected[poiData.type], 2.5, {});

Finally, you can define another activity when a marker is clicked by creating a GeoObject and calling the event onClick. You can have more information here



Login or Signup to post a comment