conversion meters to km in alerts

I have a maintenance alert, I put the attribute $position.attributes.totalDistance, it comes out in meters, the configuration in traccar is in kilometers, the question is, how can I convert this attribute to km? in the templates maintenace.vm try to divide the attribute by 1000 ($position.attributes.totalDistance/1000) but it doesn't resolve it..... thaks

Anton Tananaev2 years ago

There's $distanceUnit variable. Check speeding template to get an idea on how to use it.

OK, THAKS