Community
Topic: Geo Augmented Markers
Geo Marker Visible on Distance (SOLVED)
Hi Folks,
I'd like to have the markers visible only if the user is less than 25meters (or 100m) away from them. So, they should be hidden till the user gets close enough.
How would you recommend to implement that?
Thanks
Stefan
Hi,
first you get a list with all the possible points of interest, then in the onGeolocationChanged (Location location) method, for each element of your list, calculate the distance between your position and the position of the element (using the functions .distanceTo on android and .distance on ios), obtained the distance verify that it is less than 25m (or 100m) and add it to your new GeoElement list, after that call the SetGeoElements method passing the new list, in this way all the current markers will be replaced with the new ones.
You can find other information on this post.
Best,