This is the documentation of version 1.0.0-rc.0. 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 'promotedId' property.

    • routeIndex: number

      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.

    const routeProps: DisplayRouteRelatedProps = {
    routeState: 'selected',
    routeIndex: 0 // First route in the array
    };