TomTom Maps for JavaScript
    Preparing search index...

    Type Alias DisplayRouteRelatedProps

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

    Route properties combined with styling and index information.

    Associates route data with its position in a multi-route result and its visual state.

    Type Declaration

    • id: string

      Unique identifier for the object to ensure it can be displayed on MapLibre.

      This id es expected to become the main feature id by MapLibre via the 'promotedId' property.

    • routeIndex: number

      Zero-based index of this route in the routes array.

      Used to identify which route this data belongs to when displaying multiple alternative routes.

    Used internally by the routing module to track and style multiple routes. The routeIndex corresponds to the route's position in the original routes array.

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