The duration and distance from the routing origin to a place in the response, and a second leg from that place to the destination, if requested. Note: Adding routingSummaries
in the field mask without also including either the routingParameters.origin
parameter or the searchAlongRouteParameters.polyline.encodedPolyline
parameter in the request causes an error.
JSON representation |
---|
{
"legs": [
{
object ( |
Fields | |
---|---|
legs[] |
The legs of the trip. When you calculate travel duration and distance from a set origin, |
Leg
A leg is a single portion of a journey from one location to another.
JSON representation |
---|
{ "duration": string, "distanceMeters": integer } |
Fields | |
---|---|
duration |
The time it takes to complete this leg of the trip. A duration in seconds with up to nine fractional digits, ending with ' |
distanceMeters |
The distance of this leg of the trip. |