Display units

Switch a route's labels and your own text between metric, imperial UK and imperial US units.

View on GitHub
SDK 1.0.0

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, so formatDistance and formatDuration follow with no argument.
  • A RoutingModule with no displayUnits of its own labels in the global units when it draws, so showRoutes with the same routes relabels them.
  • Without country sections, the speed limit signs post in the display units rather than in the road’s own.

Related examples