ComputeRouteMatrixRequest

v1alpha.computeRouteMatrix request message

JSON representation
{
  "origins": [
    {
      object (RouteMatrixOrigin)
    }
  ],
  "destinations": [
    {
      object (RouteMatrixDestination)
    }
  ],
  "travelMode": enum (RouteTravelMode),
  "routingPreference": enum (RoutingPreference),
  "departureTime": string
}
Fields
origins[]

object (RouteMatrixOrigin)

Required. Array of origins, which determines the rows of the response matrix. Several size restrictions apply to the cardinality of origins and destinations:

  • The number of elements (origins × destinations) must be no greater than 625 in any case.
  • The number of elements (origins × destinations) must be no greater than 100 if routingPreference is set to TRAFFIC_AWARE_OPTIMAL.
  • The number of waypoints (origins + destinations) specified as placeId must be no greater than 50.
destinations[]

object (RouteMatrixDestination)

Required. Array of destinations, which determines the columns of the response matrix.

travelMode

enum (RouteTravelMode)

Optional. Specifies the mode of transportation.

routingPreference

enum (RoutingPreference)

Optional. Specifies how to compute the route. The server attempts to use the selected routing preference to compute the route. If the routing preference results in an error or an extra long latency, an error is returned. In the future, we might implement a fallback mechanism to use a different option when the preferred option does not give a valid result. You can specify this option only when the travelMode is DRIVE or TWO_WHEELER, otherwise the request fails.

departureTime

string (Timestamp format)

Optional. The departure time. If you don't set this value, this defaults to the time that you made the request. If you set this value to a time that has already occurred, the request fails.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

RouteMatrixOrigin

A single origin for ComputeRouteMatrixRequest

JSON representation
{
  "waypoint": {
    object (Waypoint)
  },
  "routeModifiers": {
    object (RouteModifiers)
  }
}
Fields
waypoint

object (Waypoint)

Required. Origin waypoint

routeModifiers

object (RouteModifiers)

Optional. Modifiers for every route that takes this as the origin

RouteMatrixDestination

A single destination for ComputeRouteMatrixRequest

JSON representation
{
  "waypoint": {
    object (Waypoint)
  }
}
Fields
waypoint

object (Waypoint)

Required. Destination waypoint