OptionalbeforeLayerConfig?: RoutingBeforeLayerConfigWhere the route's layers sit in the map's layer stack, for the whole route or per part.
If you leave it out, every layer sits where RoutingBeforeLayerConfig says it does by default.
Optionalcolor?: stringThe colour of the route line, its outline and the waypoint icons, as any CSS colour string.
The outline takes a darker shade of it. When unset, the map's accent colour applies if a
theme sets one (TomTomMap.mapColors), otherwise the SDK's own route blue. layers overrides
it layer by layer.
OptionalcountryCrossings?: CountryCrossingConfigAppearance of the border crossings along the route.
OptionaldisplayUnits?: DisplayUnitsUnits of the distances and durations the module writes on the map.
Optionalhighlight?: RouteHighlightConfigHow a hovered or clicked route is drawn.
Optionallayers?: RouteLayersConfigCustom layer styling configuration.
It overrides the default layer styling with custom specifications. You must provide complete layer specifications for any layer you customise. For incremental changes, you can still reuse the default configurations in defaultRoutingLayers. Any layer you don't specify keeps its default styling. Use this only if you need fine MapLibre control over how some parts of the route display.
Optionalsections?: SectionsDisplayConfigAppearance of the route sections, keyed by section type.
It covers every section type the module draws, with the same knobs: draw it or not, its colour, opacity, width, whether it bands the route or stands in for its line, its line pattern and its icon.
The types whose stretches are sparse and consequential draw themselves, and switch off with
{ visible: false }. They are carTrain, ferry, lowEmissionZone, tollRoad,
tollVignette, traffic, tunnel and vehicleRestricted. The rest switch on with
{ visible: true }, because a type covering most of a route buries the route line.
layers.sections takes full MapLibre layer specs for the same types, for anything these
knobs cannot express.
OptionalsummaryBubbles?: { visible?: boolean }The route summary bubbles on the map.
Optionalvisible?: booleanWhether the route summary bubbles show on the map.
Optionalvisible?: booleanWhether the module draws anything: route lines, waypoints, sections, guidance, summary bubbles and border crossings.
showRoutes(), showWaypoints() and the clear methods never change it. A hidden module keeps
its data until RoutingModule.setVisible shows it again. While shown, each part's own
visible (sections.<type>.visible, summaryBubbles.visible, …) still decides whether it draws.
Optionalwaypoints?: WaypointsConfigConfiguration for the waypoints source and layers to display them on the map.
OptionalwidthFactor?: numberMultiplier over the widthPreset, where 1 leaves it unchanged. The two compose, so
{ widthPreset: 'l', widthFactor: 1.5 } draws 1.5 × the "l" profile.
Clamped to 0.5 to 2, its range in routingKnobCatalogue. Sections without a widthFactor of
their own follow it, and so do the instruction arrows, which no preset resizes.
OptionalwidthPreset?: RouteWidthThickness preset of the route line and its outline, which the section and instruction lines follow.
It customises how routes look and behave, including display units, waypoint handling and layer styling.
RoutingModuleSerializableConfig for the part that survives JSON.
Configuration options for the routing module.