This is the documentation of version 1.0.0-rc.3. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias DisplayRouteRelatedProps

    DisplayRouteRelatedProps: RouteStateProps & { id: string; routeIndex: number }

    Route properties with styling and index information.

    They tie route data to its position in a multi-route result and to its visual state.

    Type Declaration

    • id: string

      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 promoteId property.

    • routeIndex: number

      The zero-based position of this route among the routes shown, the index selectRoute takes.

      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 among the routes showRoutes was given.

    const routeProps: DisplayRouteRelatedProps = {
    id: 'route-0-section-3',
    routeState: 'selected',
    routeIndex: 0 // First route shown
    };