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 ExtendedRouteRepresentation

    ExtendedRouteRepresentation: "distance" | "travelTime"

    Extended route representation options.

    They request progress information at route polyline points.

    • distance: Cumulative distance from start to each point
    • travelTime: Cumulative travel time from start to each point

    Progress points are all-or-nothing: any non-empty array returns both values, and an empty array returns neither, which keeps the progress data out of the response payload.

    // Include both distance and time progress
    const extended: ExtendedRouteRepresentation[] = ['distance', 'travelTime'];
    ['distance', 'travelTime']