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

    Type Alias RouteProgressPoint

    RouteProgressPoint: RouteProgress & { pointIndex: number }

    The progress at a specific coordinate on the route path.

    It adds to RouteProgress a pointIndex that identifies the coordinate's entry in the route's coordinate array.

    Type Declaration

    • pointIndex: number

      Zero-based index of this point in the route's coordinate array.

    The progress array of a route always has entries for the first and last points. You can linearly interpolate the progress of intermediate points between entries.

    const points: RouteProgressPoint[] = [
    { pointIndex: 0, travelTimeInSeconds: 0, distanceInMeters: 0 },
    { pointIndex: 50, travelTimeInSeconds: 120, distanceInMeters: 2500 },
    { pointIndex: 100, travelTimeInSeconds: 300, distanceInMeters: 5000 }
    ];