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 LegSummary

    LegSummary: SummaryBase & { stopTimeInSeconds?: number }

    The summary of a single route leg, the portion of the route between two consecutive waypoints.

    Type Declaration

    • OptionalstopTimeInSeconds?: number

      The time in seconds the vehicle stands still at the stop this leg arrives at.

      It is the wait a WaypointProps.pauseDurationSeconds asked for, as the service actually planned it rather than an echo of the request. That is the gap between this leg's arrivalTime and the next leg's departureTime.

      • It is absent when the vehicle does not stop at the end of this leg.
      • It is absent on the last leg, which has no following departure. The routing service does not accept a wait at the destination anyway.
      • This leg's own travelTimeInSeconds is driving only and excludes the stop, while the route's total includes every stop. So driving time is the sum of the legs, and the time spent standing still is the difference.
      // A waypoint with pauseDurationSeconds: 1800
      stopTimeInSeconds: 1800
    • An A→B route has 1 leg
    • An A→B→C route has 2 legs (A→B, B→C)