ComputeRoutesResponse

ComputeRoutesResponse.

JSON representation
{
  "routes": [
    {
      object (Route)
    }
  ]
}
Fields
routes[]

object (Route)

Contains routes between the requested origin and destination, ordered from most recommended to least recommended. Only one route is returned unless ComputeRoutesRequest.compute_alternative_routes is set to true.

Route

Details about a route between locations.

JSON representation
{
  "distanceMeters": integer,
  "duration": string,
  "attribution": {
    object (Attribution)
  },
  "encodedPolyline": string,
  "retrievalToken": string
}
Fields
distanceMeters

integer

The travel distance of the route, in meters.

duration

string (Duration format)

The length of time needed to navigate the route.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

attribution

object (Attribution)

Required attribution to show with the route.

encodedPolyline

string

An encoded polyline of the route. See https://developers.google.com/maps/documentation/utilities/polylinealgorithm

retrievalToken

string

A token that can be used to retrieve this specific route in downstream tools, such as SearchAlongRoute. Valid for 10 minutes.