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

    Type Alias RouteProps

    All the information of a calculated route, including its summary statistics, sections, guidance instructions and progress data.

    type RouteProps = {
        guidance?: Guidance;
        index: number;
        progress?: RouteProgressPoint[];
        sections: SectionsProps;
        summary: RouteSummary;
    }
    Index
    guidance?: Guidance

    The turn-by-turn navigation instructions, with maneuvers, road names and instruction text.

    They are present only when guidance was requested and is available.

    index: number

    The index of this route among the alternatives.

    The first route (index 0) is typically the recommended or best route, and the rest are alternatives.

    progress?: RouteProgressPoint[]

    The distance and time progress at key points along the route.

    It is present when extended route representations are requested, which is the default for route calculations. Use it to display progress information or calculate intermediate times.

    sections: SectionsProps

    The route sections, which are portions of the route with distinct properties such as:

    • Countries traversed
    • Traffic incidents
    • Route legs (segments between waypoints)
    • Special road types (tunnels, ferries, toll roads)
    summary: RouteSummary

    The summary statistics of the entire route, with departure and arrival times, total length and duration.