OptionalendPointIndex?: numberThe index in the route coordinates where this leg ends, present only if the route polyline geometry is available.
OptionaloriginalWaypointIndex?: numberThe index of the waypoint this leg ends at, in the locations the route was requested with.
A leg does not always end at the location with the same index. A path location expands into
legs of its own, so legs[i] is not reliably the leg arriving at locations[i + 1]. This
index maps a leg back to the stop the caller passed.
It is absent on the final leg, and on legs that end somewhere the caller did not ask for.
OptionalstartPointIndex?: numberThe index in the route coordinates where this leg starts, present only if the route polyline geometry is available.
The summary statistics of this leg of the journey, with its departure and arrival times, distances and durations.
A route section for a leg, the portion of route between two consecutive waypoints.
It is a top-level section that covers the entire journey segment.