Route properties with styling and index information.
They tie route data to its position in a multi-route result and to its visual state.
The object's unique identifier, so that MapLibre can display it.
MapLibre is expected to promote this id to the main feature id through the 'promotedId' property.
The zero-based index of this route in the routes array.
It identifies the route this data belongs to when you display multiple alternative routes.
The routing module uses them internally to track and style multiple routes. routeIndex is the route's position in the original routes array.
routeIndex
const routeProps: DisplayRouteRelatedProps = { routeState: 'selected', routeIndex: 0 // First route in the array}; Copy
const routeProps: DisplayRouteRelatedProps = { routeState: 'selected', routeIndex: 0 // First route in the array};
Route properties with styling and index information.
They tie route data to its position in a multi-route result and to its visual state.