Back to all examples
Display units
Switch a route's labels and your own text between metric, imperial UK and imperial US units.
One global setting relabels the route’s summary bubble, its speed limit signs and the panel’s summary, with no new route request.
TomTomConfig.instance.put({ displayUnits })sets the units app-wide, soformatDistanceandformatDurationfollow with no argument.- A
RoutingModulewith nodisplayUnitsof its own labels in the global units when it draws, soshowRouteswith the same routes relabels them. - Without
countrysections, the speed limit signs post in the display units rather than in the road’s own.
Related examples
Add Stops to Route
Find stops along a route within a one-minute detour and insert them all at optimal positions in a single call.
Getting Started
Routing
Search and Geocoding
Electric Vehicles
Utilities
Web
Route with alternatives
Display route alternatives and what sets each one apart
Getting Started
Routing
User Interaction Events
Utilities
Web
Add Stops to Route (Playground)
Dynamically add and remove intermediate stops on a route by clicking the map
Playground
Routing
Utilities
User Interaction Events
Web
Along route search
Find the beaches and viewpoints within a one-minute detour of a coastal drive
Getting Started
Routing
Search and Geocoding
Web