Routes

Draw polylines and paths connecting coordinates on the map.

Use MapRoute to draw polylines connecting a series of coordinates. Perfect for showing directions, trails, delivery routes, or any path between points. Routes are drawn using native MapLibre layers for optimal performance.

Basic Route

Draw a route with numbered stop markers along the path.

Map example screenshot

Route Planning

Display multiple route options and let users select between them. This example fetches real driving directions from the OSRM API. Press on a route or use the buttons to switch.

Map example screenshot