Contents

DirectionsResponse.Route

An object that represent the components of a single route.

Declaration

object DirectionsResponse.Route

Properties

NameTypeDescription
distanceMetersinteger

Total distance that the route covers, in meters.

durationSecondsinteger

The estimated time to traverse this route in seconds. If you’ve specified a departureDate or arrivalDate, then the estimated time includes traffic conditions assuming user departs or arrives at that time. If you set neither departureDate or arrivalDate, then estimated time represents current traffic conditions assuming user departs “now” from the point of origin.

hasTollsboolean

When true, this route has tolls; if false, this route has no tolls. If the value isn’t defined (“undefined”), the route may or may not have tolls.

namestring

The route name that you can use for display purposes.

stepIndexes[integer]

An array of integer values that you can use to determine the number steps along this route. Each value in the array corresponds to an index into the steps array.

transportTypestring

A string that represents the mode of transportation the service used to estimate the arrival time. Same as the input query param transportType or Automobile if the input query didn’t specify a transportation type.

See Also

Steps and routes