Route with MapLibre Customization
Calculate and display a route with MapLibre layer customizations on it.
The Tarragona to Barcelona route draws in red over a dark casing, with a dashed core down the middle and toll stretches in their own blue dash.
- Named layers such as
routeOutlineandrouteTollRoadOutlinetake raw MapLibrepaintandlayoutfromRoutingModule.create. Each merges property by property onto the layer the SDK built, so one override leaves the rest of the route alone. additionaladds a layer the SDK does not ship, positioned bybeforeIDand narrowed to the chosen route bySELECTED_ROUTE_FILTER.
Related examples
Route with custom main color
Calculate and display a route with its main color changed.
Customization
Routing
Web
Multiple routes from different origins
Display routes from multiple origins to a common destination
Customization
Routing
Web
Speed limit signs by country
Post each speed limit as a road sign shaped the way its country shapes it
Customization
Routing
Web
Route with waypoint icon styling
Calculate and display a route with quick waypoint icon styling.
Customization
Routing
Web