Start a new topic

How to show real time distance in AR Label?

¿Cómo puedo ver las distancias en cada marcador en tiempo real?

Estoy usando la versión 9.8 de la API de JavaScript de ANDROID. y probando las pantallas 10_BrowsingPois_5_NativeDetailScreen. ¿Alguien podría ayudarme por favor?


Could you please describe your issue in English so we can further assist you?

Thank you,


Hello, I have these problems 1.- How can I show the distances in real time in ARLabel?

2.- In the documentation it indicates that when a marker is selected it should change color in radarCircleSelected but it does NOT work in the sample.

I have been able to modify something in the marker.js file but the distance data does not change when I change location.

I am using version 9.8 of the ANDROID JavaScript API. and testing the sample 10_BrowsingPois_5_NativeDetailScreen. Could anyone help me please?

this is the code of marker.js






(15 KB)

Hello, i have the same issue, where can i change the value of updatePlacemarkDistancesEveryXLocationUpdates ??

Please help.

hello, is there support ????


1) You are able to check the distances in real time as you are already doing with markerLocation.distanceToUser() and you are able to change the AR.Label text by using marker.descriptionLabel.text = "newText";. As long as you have a marker instance, you can change its internal values such as title, description...

2) You will need to use the marker.markerObject.drawables.radar inside the setSelected and setDeselected methods as it is explained in If you change the radar with marker.markerObject.drawables.radar = marker.radardrawablesSelected; it will change its radar color.




The updatePlacemarkDistancesEveryXLocationUpdates variable is located in the nativedetailscreen.js with a default value of 10.

Best regards,


but the distance values ​​don't change when I move to another position.

and in the wikitude samples the distance values ​​do not change either, they are static.

how could i solve that?





The distance values should be updated after calling updateDistanceToUserValues. If you are using the same nativedetailscreen.js file, the method is only called in 2 places: when loading the pois and inside the locationChanged callback, but only after 10 location updates. Could you please try if that method is actually called? If not, you could just lower the value of updatePlacemarkDistancesEveryXLocationUpdates from 10 to 1, so the distance is updated in every location change.



Login or Signup to post a comment