Routes
(interface)ComputeRouteMatrixRequest
(message)ComputeRouteMatrixRequest.ExtraComputation
(enum)ComputeRoutesRequest
(message)ComputeRoutesRequest.ExtraComputation
(enum)ComputeRoutesRequest.ReferenceRoute
(enum)ComputeRoutesResponse
(message)FallbackInfo
(message)FallbackReason
(enum)FallbackRoutingMode
(enum)GeocodedWaypoint
(message)GeocodingResults
(message)LocalizedTime
(message)Location
(message)Maneuver
(enum)NavigationInstruction
(message)Polyline
(message)PolylineDetails
(message)PolylineDetails.FlyoverInfo
(message)PolylineDetails.NarrowRoadInfo
(message)PolylineDetails.PolylinePointIndex
(message)PolylineDetails.RoadFeatureState
(enum)PolylineEncoding
(enum)PolylineQuality
(enum)Route
(message)Route.RouteLocalizedValues
(message)RouteLabel
(enum)RouteLeg
(message)RouteLeg.RouteLegLocalizedValues
(message)RouteLeg.StepsOverview
(message)RouteLeg.StepsOverview.MultiModalSegment
(message)RouteLegStep
(message)RouteLegStep.RouteLegStepLocalizedValues
(message)RouteLegStepTransitDetails
(message)RouteLegStepTransitDetails.TransitDetailsLocalizedValues
(message)RouteLegStepTransitDetails.TransitStopDetails
(message)RouteLegStepTravelAdvisory
(message)RouteLegTravelAdvisory
(message)RouteMatrixDestination
(message)RouteMatrixElement
(message)RouteMatrixElement.LocalizedValues
(message)RouteMatrixElementCondition
(enum)RouteMatrixOrigin
(message)RouteModifiers
(message)RouteTravelAdvisory
(message)RouteTravelMode
(enum)RoutingPreference
(enum)SpeedReadingInterval
(message)SpeedReadingInterval.Speed
(enum)TollInfo
(message)TollPass
(enum)TrafficModel
(enum)TransitAgency
(message)TransitLine
(message)TransitPreferences
(message)TransitPreferences.TransitRoutingPreference
(enum)TransitPreferences.TransitTravelMode
(enum)TransitStop
(message)TransitVehicle
(message)TransitVehicle.TransitVehicleType
(enum)Units
(enum)VehicleEmissionType
(enum)VehicleInfo
(message)Waypoint
(message)The Routes API.
ComputeRouteMatrix rpc ComputeRouteMatrix(
ComputeRouteMatrixRequest
) returns (RouteMatrixElement
)
Takes in a list of origins and destinations and returns a stream containing route information for each combination of origin and destination.
NOTE: This method requires that you specify a response field mask in the input. You can provide the response field mask by using the URL parameter $fields
or fields
, or by using the HTTP/gRPC header X-Goog-FieldMask
(see the available URL parameters and headers). The value is a comma separated list of field paths. See this detailed documentation about how to construct the field paths.
For example, in this method:
X-Goog-FieldMask: *
X-Goog-FieldMask: originIndex,destinationIndex,status,condition,distanceMeters,duration
It is critical that you include status
in your field mask as otherwise all messages will appear to be OK. Google discourages the use of the wildcard (*
) response field mask, because:
rpc ComputeRoutes(
ComputeRoutesRequest
) returns (ComputeRoutesResponse
)
Returns the primary route along with optional alternate routes, given a set of terminal and intermediate waypoints.
NOTE: This method requires that you specify a response field mask in the input. You can provide the response field mask by using URL parameter $fields
or fields
, or by using an HTTP/gRPC header X-Goog-FieldMask
(see the available URL parameters and headers). The value is a comma separated list of field paths. See detailed documentation about how to construct the field paths.
For example, in this method:
X-Goog-FieldMask: *
X-Goog-FieldMask: routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline
Google discourage the use of the wildcard (*
) response field mask, or specifying the field mask at the top level (routes
), because:
ComputeRouteMatrix request message
Fieldsorigins[]
Required. Array of origins, which determines the rows of the response matrix. Several size restrictions apply to the cardinality of origins and destinations:
place_id
or address
must be no greater than 50.TRAFFIC_AWARE_OPTIMAL
.TRANSIT
.destinations[]
Required. Array of destinations, which determines the columns of the response matrix.
travel_mode
Optional. Specifies the mode of transportation.
routing_preference
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. You can specify this option only when the travel_mode
is DRIVE
or TWO_WHEELER
, otherwise the request fails.
departure_time
Optional. The departure time. If you don't set this value, then this value defaults to the time that you made the request. NOTE: You can only specify a departure_time
in the past when
is set to RouteTravelMode
TRANSIT
.
arrival_time
Optional. The arrival time. NOTE: Can only be set when
is set to RouteTravelMode
TRANSIT
. You can specify either departure_time
or arrival_time
, but not both.
language_code
string
Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Unicode Locale Identifier. See Language Support for the list of supported languages. When you don't provide this value, the display language is inferred from the location of the first origin.
region_code
string
Optional. The region code, specified as a ccTLD ("top-level domain") two-character value. For more information see Country code top-level domains.
units
Optional. Specifies the units of measure for the display fields.
traffic_model
Optional. Specifies the assumptions to use when calculating time in traffic. This setting affects the value returned in the duration field in the RouteMatrixElement
which contains the predicted time in traffic based on historical averages. TrafficModel
is only available for requests that have set RoutingPreference
to TRAFFIC_AWARE_OPTIMAL
and RouteTravelMode
to DRIVE
. Defaults to BEST_GUESS
if traffic is requested and TrafficModel
is not specified.
transit_preferences
Optional. Specifies preferences that influence the route returned for TRANSIT
routes. NOTE: You can only specify a transit_preferences
when RouteTravelMode
is set to TRANSIT
.
ComputeRoutes request message.
Fieldsorigin
Required. Origin waypoint.
destination
Required. Destination waypoint.
intermediates[]
Optional. A set of waypoints along the route (excluding terminal points), for either stopping at or passing by. Up to 25 intermediate waypoints are supported.
travel_mode
Optional. Specifies the mode of transportation.
routing_preference
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, then an error is returned. You can specify this option only when the travel_mode
is DRIVE
or TWO_WHEELER
, otherwise the request fails.
polyline_quality
Optional. Specifies your preference for the quality of the polyline.
polyline_encoding
Optional. Specifies the preferred encoding for the polyline.
departure_time
Optional. The departure time. If you don't set this value, then this value defaults to the time that you made the request. NOTE: You can only specify a departure_time
in the past when
is set to RouteTravelMode
TRANSIT
. Transit trips are available for up to 7 days in the past or 100 days in the future.
arrival_time
Optional. The arrival time. NOTE: This field is ignored when requests specify a RouteTravelMode
other than TRANSIT
. You can specify either departure_time
or arrival_time
, but not both. Transit trips are available for up to 7 days in the past or 100 days in the future.
compute_alternative_routes
bool
Optional. Specifies whether to calculate alternate routes in addition to the route. No alternative routes are returned for requests that have intermediate waypoints.
route_modifiers
Optional. A set of conditions to satisfy that affect the way routes are calculated.
language_code
string
Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see Unicode Locale Identifier. See Language Support for the list of supported languages. When you don't provide this value, the display language is inferred from the location of the route request.
region_code
string
Optional. The region code, specified as a ccTLD ("top-level domain") two-character value. For more information see Country code top-level domains.
units
Optional. Specifies the units of measure for the display fields. These fields include the instruction
field in
. The units of measure used for the route, leg, step distance, and duration are not affected by this value. If you don't provide this value, then the display units are inferred from the location of the first origin.NavigationInstruction
optimize_waypoint_order
bool
Optional. If set to true, the service attempts to minimize the overall cost of the route by re-ordering the specified intermediate waypoints. The request fails if any of the intermediate waypoints is a via
waypoint. Use ComputeRoutesResponse.Routes.optimized_intermediate_waypoint_index
to find the new ordering. If ComputeRoutesResponseroutes.optimized_intermediate_waypoint_index
is not requested in the X-Goog-FieldMask
header, the request fails. If optimize_waypoint_order
is set to false, ComputeRoutesResponse.optimized_intermediate_waypoint_index
will be empty.
requested_reference_routes[]
Optional. Specifies what reference routes to calculate as part of the request in addition to the default route. A reference route is a route with a different route calculation objective than the default route. For example a FUEL_EFFICIENT
reference route calculation takes into account various parameters that would generate an optimal fuel efficient route. When using this feature, look for
on the resulting routes.route_labels
traffic_model
Optional. Specifies the assumptions to use when calculating time in traffic. This setting affects the value returned in the duration field in the
and Route
which contains the predicted time in traffic based on historical averages. RouteLeg
TrafficModel
is only available for requests that have set
to RoutingPreference
TRAFFIC_AWARE_OPTIMAL
and
to RouteTravelMode
DRIVE
. Defaults to BEST_GUESS
if traffic is requested and TrafficModel
is not specified.
transit_preferences
Optional. Specifies preferences that influence the route returned for TRANSIT
routes. NOTE: You can only specify a transit_preferences
when
is set to RouteTravelMode
TRANSIT
.
A supported reference route on the ComputeRoutesRequest.
EnumsREFERENCE_ROUTE_UNSPECIFIED
Not used. Requests containing this value fail. FUEL_EFFICIENT
Fuel efficient route. SHORTER_DISTANCE
Route with shorter travel distance. This is an experimental feature.
For DRIVE
requests, this feature prioritizes shorter distance over driving comfort. For example, it may prefer local roads instead of highways, take dirt roads, cut through parking lots, etc. This feature does not return any maneuvers that Google Maps knows to be illegal.
For BICYCLE
and TWO_WHEELER
requests, this feature returns routes similar to those returned when you don't specify requested_reference_routes
.
This feature is not compatible with any other travel modes, via intermediate waypoints, or optimize_waypoint_order
; such requests will fail. However, you can use it with any routing_preference
.
ComputeRoutes the response message.
Fieldsroutes[]
Contains an array of computed routes (up to three) when you specify compute_alternatives_routes
, and contains just one route when you don't. When this array contains multiple entries, the first one is the most recommended route. If the array is empty, then it means no route could be found.
fallback_info
In some cases when the server is not able to compute the route results with all of the input preferences, it may fallback to using a different way of computation. When fallback mode is used, this field contains detailed info about the fallback response. Otherwise this field is unset.
geocoding_results
Contains geocoding response info for waypoints specified as addresses.
FallbackInfoInformation related to how and why a fallback result was used. If this field is set, then it means the server used a different routing mode from your preferred mode as fallback.
Fieldsrouting_mode
Routing mode used for the response. If fallback was triggered, the mode may be different from routing preference set in the original client request.
reason
The reason why fallback response was used instead of the original response. This field is only populated when the fallback mode is triggered and the fallback response is returned.
FallbackReasonReasons for using fallback response.
EnumsFALLBACK_REASON_UNSPECIFIED
No fallback reason specified. SERVER_ERROR
A server error happened while calculating routes with your preferred routing mode, but we were able to return a result calculated by an alternative mode. LATENCY_EXCEEDED
We were not able to finish the calculation with your preferred routing mode on time, but we were able to return a result calculated by an alternative mode. FallbackRoutingMode
Actual routing mode used for returned fallback response.
EnumsFALLBACK_ROUTING_MODE_UNSPECIFIED
Not used. FALLBACK_TRAFFIC_UNAWARE
Indicates the TRAFFIC_UNAWARE
RoutingPreference
was used to compute the response. FALLBACK_TRAFFIC_AWARE
Indicates the TRAFFIC_AWARE
RoutingPreference
was used to compute the response. GeocodedWaypoint
Details about the locations used as waypoints. Only populated for address waypoints. Includes details about the geocoding results for the purposes of determining what the address was geocoded to.
Fieldsgeocoder_status
Indicates the status code resulting from the geocoding operation.
type[]
string
The type(s) of the result, in the form of zero or more type tags. Supported types: Address types and address component types.
partial_match
bool
Indicates that the geocoder did not return an exact match for the original request, though it was able to match part of the requested address. You may wish to examine the original request for misspellings and/or an incomplete address.
place_id
string
The place ID for this result.
intermediate_waypoint_request_index
int32
The index of the corresponding intermediate waypoint in the request. Only populated if the corresponding waypoint is an intermediate waypoint.
GeocodingResultsContains
for origin, destination and intermediate waypoints. Only populated for address waypoints.GeocodedWaypoints
origin
Origin geocoded waypoint.
destination
Destination geocoded waypoint.
intermediates[]
A list of intermediate geocoded waypoints each containing an index field that corresponds to the zero-based position of the waypoint in the order they were specified in the request.
LocalizedTimeLocalized description of time.
Fieldstime
The time specified as a string in a given time zone.
time_zone
string
Contains the time zone. The value is the name of the time zone as defined in the IANA Time Zone Database, e.g. "America/New_York".
LocationEncapsulates a location (a geographic point, and an optional heading).
Fieldslat_lng
The waypoint's geographic coordinates.
heading
The compass heading associated with the direction of the flow of traffic. This value specifies the side of the road for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, and so on. You can use this field only for DRIVE
and TWO_WHEELER
.RouteTravelMode
A set of values that specify the navigation action to take for the current step (for example, turn left, merge, or straight).
EnumsMANEUVER_UNSPECIFIED
Not used. TURN_SLIGHT_LEFT
Turn slightly to the left. TURN_SHARP_LEFT
Turn sharply to the left. UTURN_LEFT
Make a left u-turn. TURN_LEFT
Turn left. TURN_SLIGHT_RIGHT
Turn slightly to the right. TURN_SHARP_RIGHT
Turn sharply to the right. UTURN_RIGHT
Make a right u-turn. TURN_RIGHT
Turn right. STRAIGHT
Go straight. RAMP_LEFT
Take the left ramp. RAMP_RIGHT
Take the right ramp. MERGE
Merge into traffic. FORK_LEFT
Take the left fork. FORK_RIGHT
Take the right fork. FERRY
Take the ferry. FERRY_TRAIN
Take the train leading onto the ferry. ROUNDABOUT_LEFT
Turn left at the roundabout. ROUNDABOUT_RIGHT
Turn right at the roundabout. DEPART
Initial maneuver. NAME_CHANGE
Used to indicate a street name change. NavigationInstruction
Encapsulates navigation instructions for a
.RouteLegStep
maneuver
Encapsulates the navigation instructions for the current step (for example, turn left, merge, or straight). This field determines which icon to display.
instructions
string
Instructions for navigating this step.
PolylineEncapsulates an encoded polyline.
Fields Union fieldpolyline_type
. Encapsulates the type of polyline. Defaults to encoded_polyline. polyline_type
can be only one of the following: encoded_polyline
string
The string encoding of the polyline using the polyline encoding algorithm
geo_json_linestring
Specifies a polyline using the GeoJSON LineString format.
PolylineDetailsDetails corresponding to a given index or contiguous segment of a polyline. Given a polyline with points P_0, P_1, ... , P_N (zero-based index), the PolylineDetails
defines an interval and associated metadata.
flyover_info[]
Flyover details along the polyline.
narrow_road_info[]
Narrow road details along the polyline.
FlyoverInfoEncapsulates information about flyovers along the polyline.
Fieldsflyover_presence
Output only. Denotes whether a flyover exists for a given stretch of the polyline.
polyline_point_index
The location of flyover related information along the polyline.
NarrowRoadInfoEncapsulates information about narrow roads along the polyline.
Fieldsnarrow_road_presence
Output only. Denotes whether a narrow road exists for a given stretch of the polyline.
polyline_point_index
The location of narrow road related information along the polyline.
PolylinePointIndexEncapsulates the start and end indexes for a polyline detail. For instances where the data corresponds to a single point, start_index
and end_index
will be equal.
start_index
int32
The start index of this detail in the polyline.
end_index
int32
The end index of this detail in the polyline.
RoadFeatureStateEncapsulates the states of road features along a stretch of polyline.
EnumsROAD_FEATURE_STATE_UNSPECIFIED
The road feature's state was not computed (default value). EXISTS
The road feature exists. DOES_NOT_EXIST
The road feature does not exist. PolylineEncoding
Specifies the preferred type of polyline to be returned.
EnumsPOLYLINE_ENCODING_UNSPECIFIED
No polyline type preference specified. Defaults to ENCODED_POLYLINE
. ENCODED_POLYLINE
Specifies a polyline encoded using the polyline encoding algorithm. GEO_JSON_LINESTRING
Specifies a polyline using the GeoJSON LineString format PolylineQuality
A set of values that specify the quality of the polyline.
EnumsPOLYLINE_QUALITY_UNSPECIFIED
No polyline quality preference specified. Defaults to OVERVIEW
. HIGH_QUALITY
Specifies a high-quality polyline - which is composed using more points than OVERVIEW
, at the cost of increased response size. Use this value when you need more precision. OVERVIEW
Specifies an overview polyline - which is composed using a small number of points. Use this value when displaying an overview of the route. Using this option has a lower request latency compared to using the HIGH_QUALITY
option. Route
Contains a route, which consists of a series of connected road segments that join beginning, ending, and intermediate waypoints.
Fieldsroute_labels[]
Labels for the Route
that are useful to identify specific properties of the route to compare against others.
legs[]
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-via
. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-Waypoints
via
intermediate waypoint has two legs. A route that includes one via
intermediate waypoint has one leg. The order of the legs matches the order of waypoints from origin
to intermediates
to destination
.
distance_meters
int32
The travel distance of the route, in meters.
duration
The length of time needed to navigate the route. If you set the routing_preference
to TRAFFIC_UNAWARE
, then this value is the same as static_duration
. If you set the routing_preference
to either TRAFFIC_AWARE
or TRAFFIC_AWARE_OPTIMAL
, then this value is calculated taking traffic conditions into account.
static_duration
The duration of travel through the route without taking traffic conditions into consideration.
polyline
The overall route polyline. This polyline is the combined polyline of all legs
.
description
string
A description of the route.
warnings[]
string
An array of warnings to show when displaying the route.
viewport
The viewport bounding box of the polyline.
travel_advisory
Additional information about the route.
optimized_intermediate_waypoint_index[]
int32
If you set
to true, this field contains the optimized ordering of intermediate waypoints. Otherwise, this field is empty. For example, if you give an input of Origin: LA; Intermediate waypoints: Dallas, Bangor, Phoenix; Destination: New York; and the optimized intermediate waypoint order is Phoenix, Dallas, Bangor, then this field contains the values [2, 0, 1]. The index starts with 0 for the first intermediate waypoint provided in the input.optimize_waypoint_order
localized_values
Text representations of properties of the Route
.
route_token
string
An opaque token that can be passed to Navigation SDK to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when the route was created. Treat this token as an opaque blob. Don't compare its value across requests as its value may change even if the service returns the exact same route.
NOTE: Route.route_token
is only available for requests that have set ComputeRoutesRequest.routing_preference
to TRAFFIC_AWARE
or TRAFFIC_AWARE_OPTIMAL
. Route.route_token
is not supported for requests that have Via waypoints.
polyline_details
Contains information about details along the polyline.
RouteLocalizedValuesText representations of certain properties.
Fieldsdistance
Travel distance represented in text form.
duration
Duration, represented in text form and localized to the region of the query. Takes traffic conditions into consideration. Note: If you did not request traffic information, this value is the same value as static_duration
.
static_duration
Duration without taking traffic conditions into consideration, represented in text form.
transit_fare
Transit fare represented in text form.
RouteLabelLabels for the
that are useful to identify specific properties of the route to compare against others.Route
ROUTE_LABEL_UNSPECIFIED
Default - not used. DEFAULT_ROUTE
The default "best" route returned for the route computation. DEFAULT_ROUTE_ALTERNATE
An alternative to the default "best" route. Routes like this will be returned when compute_alternative_routes
is specified. FUEL_EFFICIENT
Fuel efficient route. Routes labeled with this value are determined to be optimized for Eco parameters such as fuel consumption. SHORTER_DISTANCE
Shorter travel distance route. This is an experimental feature. RouteLeg
Contains a segment between non-via
waypoints.
distance_meters
int32
The travel distance of the route leg, in meters.
duration
The length of time needed to navigate the leg. If the route_preference
is set to TRAFFIC_UNAWARE
, then this value is the same as static_duration
. If the route_preference
is either TRAFFIC_AWARE
or TRAFFIC_AWARE_OPTIMAL
, then this value is calculated taking traffic conditions into account.
static_duration
The duration of travel through the leg, calculated without taking traffic conditions into consideration.
polyline
The overall polyline for this leg that includes each step
's polyline.
start_location
The start location of this leg. This location might be different from the provided origin
. For example, when the provided origin
is not near a road, this is a point on the road.
end_location
The end location of this leg. This location might be different from the provided destination
. For example, when the provided destination
is not near a road, this is a point on the road.
steps[]
An array of steps denoting segments within this leg. Each step represents one navigation instruction.
travel_advisory
Contains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a route leg.
localized_values
Text representations of properties of the RouteLeg
.
steps_overview
Overview information about the steps in this RouteLeg
. This field is only populated for TRANSIT routes.
Text representations of certain properties.
Fieldsdistance
Travel distance represented in text form.
duration
Duration, represented in text form and localized to the region of the query. Takes traffic conditions into consideration. Note: If you did not request traffic information, this value is the same value as static_duration.
static_duration
Duration without taking traffic conditions into consideration, represented in text form.
StepsOverviewProvides overview information about a list of RouteLegStep
s.
multi_modal_segments[]
Summarized information about different multi-modal segments of the RouteLeg.steps
. This field is not populated if the RouteLeg
does not contain any multi-modal segments in the steps.
Provides summarized information about different multi-modal segments of the RouteLeg.steps
. A multi-modal segment is defined as one or more contiguous RouteLegStep
that have the same RouteTravelMode
. This field is not populated if the RouteLeg
does not contain any multi-modal segments in the steps.
navigation_instruction
NavigationInstruction for the multi-modal segment.
travel_mode
The travel mode of the multi-modal segment.
step_start_index
int32
The corresponding RouteLegStep
index that is the start of a multi-modal segment.
step_end_index
int32
The corresponding RouteLegStep
index that is the end of a multi-modal segment.
Contains a segment of a
. A step corresponds to a single navigation instruction. Route legs are made up of steps.RouteLeg
distance_meters
int32
The travel distance of this step, in meters. In some circumstances, this field might not have a value.
static_duration
The duration of travel through this step without taking traffic conditions into consideration. In some circumstances, this field might not have a value.
polyline
The polyline associated with this step.
start_location
The start location of this step.
end_location
The end location of this step.
navigation_instruction
Navigation instructions.
travel_advisory
Contains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a leg step.
localized_values
Text representations of properties of the RouteLegStep
.
transit_details
Details pertaining to this step if the travel mode is TRANSIT
.
travel_mode
The travel mode used for this step.
RouteLegStepLocalizedValuesText representations of certain properties.
Fieldsdistance
Travel distance represented in text form.
static_duration
Duration without taking traffic conditions into consideration, represented in text form.
RouteLegStepTransitDetailsAdditional information for the RouteLegStep
related to TRANSIT
routes.
stop_details
Information about the arrival and departure stops for the step.
localized_values
Text representations of properties of the RouteLegStepTransitDetails
.
headsign
string
Specifies the direction in which to travel on this line as marked on the vehicle or at the departure stop. The direction is often the terminus station.
headway
Specifies the expected time as a duration between departures from the same stop at this time. For example, with a headway seconds value of 600, you would expect a ten minute wait if you should miss your bus.
transit_line
Information about the transit line used in this step.
stop_count
int32
The number of stops from the departure to the arrival stop. This count includes the arrival stop, but excludes the departure stop. For example, if your route leaves from Stop A, passes through stops B and C, and arrives at stop D,
stop_count
returns 3.
trip_short_text
string
The text that appears in schedules and sign boards to identify a transit trip to passengers. The text should uniquely identify a trip within a service day. For example, "538" is the trip_short_text
of the Amtrak train that leaves San Jose, CA at 15:10 on weekdays to Sacramento, CA.
Localized descriptions of values for RouteTransitDetails
.
arrival_time
Time in its formatted text representation with a corresponding time zone.
departure_time
Time in its formatted text representation with a corresponding time zone.
TransitStopDetailsDetails about the transit stops for the RouteLegStep
.
arrival_stop
Information about the arrival stop for the step.
arrival_time
The estimated time of arrival for the step.
departure_stop
Information about the departure stop for the step.
departure_time
The estimated time of departure for the step.
RouteLegStepTravelAdvisoryContains the additional information that the user should be informed about, such as possible traffic zone restrictions on a leg step.
RouteLegTravelAdvisoryContains the additional information that the user should be informed about on a leg step, such as possible traffic zone restrictions.
Fieldstoll_info
Contains information about tolls on the specific RouteLeg
. This field is only populated if we expect there are tolls on the RouteLeg
and TOLLS
is included in the request's ComputeRoutesRequest.extra_computations
. If this field is set but the estimated_price subfield is not populated, we expect that road contains tolls but we do not know an estimated price. If toll_info
does not exist, then there is no toll on the RouteLeg
.
speed_reading_intervals[]
Speed reading intervals indicating traffic density. This field is only populated for requests when the request has a TRAFFIC_AWARE
or TRAFFIC_AWARE_OPTIMAL
ComputeRoutesRequest.routing_preference
value, and TRAFFIC_ON_POLYLINE
is included in the ComputeRoutesRequest.extra_computations
. The intervals cover the entire polyline of the RouteLeg
without overlap. The start point of a specified interval is the same as the end point of the preceding interval.
Example:
polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
speed_reading_intervals: [A,C), [C,D), [D,G).
RouteMatrixDestination
A single destination for ComputeRouteMatrixRequest
Fieldswaypoint
Required. Destination waypoint
RouteMatrixElementContains route information computed for an origin/destination pair in the ComputeRouteMatrix API. This proto can be streamed to the client.
Fieldsstatus
Error status code for this element.
condition
Indicates whether the route was found or not. Independent of status.
distance_meters
int32
The travel distance of the route, in meters.
duration
The length of time needed to navigate the route. If you set the routing_preference
to TRAFFIC_UNAWARE
, then this value is the same as static_duration
. If you set the routing_preference
to either TRAFFIC_AWARE
or TRAFFIC_AWARE_OPTIMAL
, then this value is calculated taking traffic conditions into account.
static_duration
The duration of traveling through the route without taking traffic conditions into consideration.
travel_advisory
Additional information about the route. For example: restriction information and toll information
fallback_info
In some cases when the server is not able to compute the route with the given preferences for this particular origin/destination pair, it may fall back to using a different mode of computation. When fallback mode is used, this field contains detailed information about the fallback response. Otherwise this field is unset.
localized_values
Text representations of properties of the RouteMatrixElement
.
origin_index
int32
Zero-based index of the origin in the request.
destination_index
int32
Zero-based index of the destination in the request.
LocalizedValuesText representations of certain properties.
Fieldsdistance
Travel distance represented in text form.
duration
Duration represented in text form taking traffic conditions into consideration. Note: If traffic information was not requested, this value is the same value as static_duration.
static_duration
Duration represented in text form without taking traffic conditions into consideration.
transit_fare
Transit fare represented in text form.
RouteMatrixElementConditionThe condition of the route being returned.
EnumsROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED
Only used when the status
of the element is not OK. ROUTE_EXISTS
A route was found, and the corresponding information was filled out for the element. ROUTE_NOT_FOUND
No route could be found. Fields containing route information, such as distance_meters
or duration
, will not be filled out in the element. RouteMatrixOrigin
A single origin for ComputeRouteMatrixRequest
Fieldswaypoint
Required. Origin waypoint
route_modifiers
Optional. Modifiers for every route that takes this as the origin
RouteModifiersEncapsulates a set of optional conditions to satisfy when calculating the routes.
Fieldsavoid_tolls
bool
When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the DRIVE
and TWO_WHEELER
.RouteTravelMode
avoid_highways
bool
When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the DRIVE
and TWO_WHEELER
.RouteTravelMode
avoid_ferries
bool
When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the DRIVE
andTWO_WHEELER
.RouteTravelMode
avoid_indoor
bool
When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation. Applies only to the WALK
.RouteTravelMode
vehicle_info
Specifies the vehicle information.
toll_passes[]
Encapsulates information about toll passes. If toll passes are provided, the API tries to return the pass price. If toll passes are not provided, the API treats the toll pass as unknown and tries to return the cash price. Applies only to the DRIVE
and TWO_WHEELER
.RouteTravelMode
Contains the additional information that the user should be informed about, such as possible traffic zone restrictions.
Fieldstoll_info
Contains information about tolls on the route. This field is only populated if tolls are expected on the route and TOLLS
is included in the request's ComputeRoutesRequest.extra_computations
. If this field is set, but the estimatedPrice
subfield is not populated, then the route contains tolls, but the estimated price is unknown. If toll_info
is not set, then there are no tolls expected on the route.
speed_reading_intervals[]
Speed reading intervals indicating traffic density. This field is only populated for requests when the request has a TRAFFIC_AWARE
or TRAFFIC_AWARE_OPTIMAL
ComputeRoutesRequest.routing_preference
value, and TRAFFIC_ON_POLYLINE
is included in the ComputeRoutesRequest.extra_computations
. The intervals cover the entire polyline of the route without overlap. The start point of a specified interval is the same as the end point of the preceding interval.
Example:
polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
speed_reading_intervals: [A,C), [C,D), [D,G).
fuel_consumption_microliters
int64
The predicted fuel consumption in microliters. This field is only populated when FUEL_CONSUMPTION
is included in the request's ComputeRoutesRequest.extra_computations
.
route_restrictions_partially_ignored
bool
Returned route may have restrictions that are not suitable for requested travel mode or route modifiers.
transit_fare
If present, contains the total fare or ticket costs on this route This property is only returned for TRANSIT
requests and only for routes where fare information is available for all transit steps.
A set of values used to specify the mode of travel. NOTE: WALK
, BICYCLE
, and TWO_WHEELER
routes are in beta and might sometimes be missing clear sidewalks, pedestrian paths, or bicycling paths. You must display this warning to the user for all walking, bicycling, and two-wheel routes that you display in your app.
TRAVEL_MODE_UNSPECIFIED
No travel mode specified. Defaults to DRIVE
. DRIVE
Travel by passenger car. BICYCLE
Travel by bicycle. WALK
Travel by walking. TWO_WHEELER
Two-wheeled, motorized vehicle. For example, motorcycle. Note that this differs from the BICYCLE
travel mode which covers human-powered mode. TRANSIT
Travel by public transit routes, where available. RoutingPreference
A set of values that specify factors to take into consideration when calculating the route.
EnumsROUTING_PREFERENCE_UNSPECIFIED
No routing preference specified. Default to TRAFFIC_UNAWARE
. TRAFFIC_UNAWARE
Computes routes without taking live traffic conditions into consideration. Suitable when traffic conditions don't matter or are not applicable. Using this value produces the lowest latency. Note: For RouteTravelMode
DRIVE
and TWO_WHEELER
, the route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency. TRAFFIC_AWARE
Calculates routes taking live traffic conditions into consideration. In contrast to TRAFFIC_AWARE_OPTIMAL
, some optimizations are applied to significantly reduce latency. TRAFFIC_AWARE_OPTIMAL
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency. SpeedReadingInterval
Traffic density indicator on a contiguous segment of a polyline or path. Given a path with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval
defines an interval and describes its traffic using the following categories.
start_polyline_point_index
int32
The starting index of this interval in the polyline.
end_polyline_point_index
int32
The ending index of this interval in the polyline.
Union fieldspeed_type
. The type of speed in this interval. speed_type
can be only one of the following: speed
Traffic speed in this interval.
SpeedThe classification of polyline speed based on traffic data.
EnumsSPEED_UNSPECIFIED
Default value. This value is unused. NORMAL
Normal speed, no traffic delays. SLOW
Slowdown detected, medium amount of traffic. TRAFFIC_JAM
Traffic delays. TollInfo
Encapsulates toll information on a
or on a Route
.RouteLeg
estimated_price[]
The monetary amount of tolls for the corresponding
or Route
. This list contains a money amount for each currency that is expected to be charged by the toll stations. Typically this list will contain only one item for routes with tolls in one currency. For international trips, this list may contain multiple items to reflect tolls in different currencies.RouteLeg
List of toll passes around the world that we support.
EnumsTOLL_PASS_UNSPECIFIED
Not used. If this value is used, then the request fails. AU_ETOLL_TAG
Sydney toll pass. See additional details at https://www.myetoll.com.au. AU_EWAY_TAG
Sydney toll pass. See additional details at https://www.tollpay.com.au. AU_LINKT
Australia-wide toll pass. See additional details at https://www.linkt.com.au/. AR_TELEPASE
Argentina toll pass. See additional details at https://telepase.com.ar BR_AUTO_EXPRESO
Brazil toll pass. See additional details at https://www.autoexpreso.com BR_CONECTCAR
Brazil toll pass. See additional details at https://conectcar.com. BR_MOVE_MAIS
Brazil toll pass. See additional details at https://movemais.com. BR_PASSA_RAPIDO
Brazil toll pass. See additional details at https://pasorapido.gob.do/ BR_SEM_PARAR
Brazil toll pass. See additional details at https://www.semparar.com.br. BR_TAGGY
Brazil toll pass. See additional details at https://taggy.com.br. BR_VELOE
Brazil toll pass. See additional details at https://veloe.com.br/site/onde-usar. CA_US_AKWASASNE_SEAWAY_CORPORATE_CARD
Canada to United States border crossing. CA_US_AKWASASNE_SEAWAY_TRANSIT_CARD
Canada to United States border crossing. CA_US_BLUE_WATER_EDGE_PASS
Ontario, Canada to Michigan, United States border crossing. CA_US_CONNEXION
Ontario, Canada to Michigan, United States border crossing. CA_US_NEXUS_CARD
Canada to United States border crossing. ID_E_TOLL
Indonesia. E-card provided by multiple banks used to pay for tolls. All e-cards via banks are charged the same so only one enum value is needed. E.g. - Bank Mandiri https://www.bankmandiri.co.id/e-money - BCA https://www.bca.co.id/flazz - BNI https://www.bni.co.id/id-id/ebanking/tapcash IN_FASTAG
India. IN_LOCAL_HP_PLATE_EXEMPT
India, HP state plate exemption. JP_ETC
Japan ETC. Electronic wireless system to collect tolls. https://www.go-etc.jp/ JP_ETC2
Japan ETC2.0. New version of ETC with further discount and bidirectional communication between devices on vehicles and antennas on the road. https://www.go-etc.jp/etc2/index.html MX_IAVE
Mexico toll pass. https://iave.capufe.gob.mx/#/ MX_PASE
Mexico https://www.pase.com.mx MX_QUICKPASS
Mexico https://operadoravial.com/quick-pass/ MX_SISTEMA_TELEPEAJE_CHIHUAHUA
http://appsh.chihuahua.gob.mx/transparencia/?doc=/ingresos/TelepeajeFormato4.pdf MX_TAG_IAVE
Mexico MX_TAG_TELEVIA
Mexico toll pass company. One of many operating in Mexico City. See additional details at https://www.televia.com.mx. MX_TELEVIA
Mexico toll pass company. One of many operating in Mexico City. https://www.televia.com.mx MX_VIAPASS
Mexico toll pass. See additional details at https://www.viapass.com.mx/viapass/web_home.aspx. US_AL_FREEDOM_PASS
AL, USA. US_AK_ANTON_ANDERSON_TUNNEL_BOOK_OF_10_TICKETS
AK, USA. US_CA_FASTRAK
CA, USA. US_CA_FASTRAK_CAV_STICKER
Indicates driver has any FasTrak pass in addition to the DMV issued Clean Air Vehicle (CAV) sticker. https://www.bayareafastrak.org/en/guide/doINeedFlex.shtml US_CO_EXPRESSTOLL
CO, USA. US_CO_GO_PASS
CO, USA. US_DE_EZPASSDE
DE, USA. US_FL_BOB_SIKES_TOLL_BRIDGE_PASS
FL, USA. US_FL_EPASS
FL, USA. US_FL_GIBA_TOLL_PASS
FL, USA. US_FL_LEEWAY
FL, USA. US_FL_SUNPASS
FL, USA. US_FL_SUNPASS_PRO
FL, USA. US_IL_EZPASSIL
IL, USA. US_IL_IPASS
IL, USA. US_IN_EZPASSIN
IN, USA. US_KS_BESTPASS_HORIZON
KS, USA. US_KS_KTAG
KS, USA. US_KS_NATIONALPASS
KS, USA. US_KS_PREPASS_ELITEPASS
KS, USA. US_KY_RIVERLINK
KY, USA. US_LA_GEAUXPASS
LA, USA. US_LA_TOLL_TAG
LA, USA. US_MA_EZPASSMA
MA, USA. US_MD_EZPASSMD
MD, USA. US_ME_EZPASSME
ME, USA. US_MI_AMBASSADOR_BRIDGE_PREMIER_COMMUTER_CARD
MI, USA. US_MI_BCPASS
MI, USA. US_MI_GROSSE_ILE_TOLL_BRIDGE_PASS_TAG
MI, USA. US_MI_IQ_PROX_CARD
MI, USA. Deprecated as this pass type no longer exists.
This item is deprecated!
US_MI_IQ_TAG
MI, USA. US_MI_MACKINAC_BRIDGE_MAC_PASS
MI, USA. US_MI_NEXPRESS_TOLL
MI, USA. US_MN_EZPASSMN
MN, USA. US_NC_EZPASSNC
NC, USA. US_NC_PEACH_PASS
NC, USA. US_NC_QUICK_PASS
NC, USA. US_NH_EZPASSNH
NH, USA. US_NJ_DOWNBEACH_EXPRESS_PASS
NJ, USA. US_NJ_EZPASSNJ
NJ, USA. US_NY_EXPRESSPASS
NY, USA. US_NY_EZPASSNY
NY, USA. US_OH_EZPASSOH
OH, USA. US_PA_EZPASSPA
PA, USA. US_RI_EZPASSRI
RI, USA. US_SC_PALPASS
SC, USA. US_TX_AVI_TAG
TX, USA. US_TX_BANCPASS
TX, USA. US_TX_DEL_RIO_PASS
TX, USA. US_TX_EFAST_PASS
TX, USA. US_TX_EAGLE_PASS_EXPRESS_CARD
TX, USA. US_TX_EPTOLL
TX, USA. US_TX_EZ_CROSS
TX, USA. US_TX_EZTAG
TX, USA. US_TX_FUEGO_TAG
TX, USA. US_TX_LAREDO_TRADE_TAG
TX, USA. US_TX_PLUSPASS
TX, USA. US_TX_TOLLTAG
TX, USA. US_TX_TXTAG
TX, USA. US_TX_XPRESS_CARD
TX, USA. US_UT_ADAMS_AVE_PARKWAY_EXPRESSCARD
UT, USA. US_VA_EZPASSVA
VA, USA. US_WA_BREEZEBY
WA, USA. US_WA_GOOD_TO_GO
WA, USA. US_WV_EZPASSWV
WV, USA. US_WV_MEMORIAL_BRIDGE_TICKETS
WV, USA. US_WV_MOV_PASS
WV, USA US_WV_NEWELL_TOLL_BRIDGE_TICKET
WV, USA. TrafficModel
Specifies the assumptions to use when calculating time in traffic. This setting affects the value returned in the duration
field in the response, which contains the predicted time in traffic based on historical averages.
TRAFFIC_MODEL_UNSPECIFIED
Unused. If specified, will default to BEST_GUESS
. BEST_GUESS
Indicates that the returned duration
should be the best estimate of travel time given what is known about both historical traffic conditions and live traffic. Live traffic becomes more important the closer the departure_time
is to now. PESSIMISTIC
Indicates that the returned duration should be longer than the actual travel time on most days, though occasional days with particularly bad traffic conditions may exceed this value. OPTIMISTIC
Indicates that the returned duration should be shorter than the actual travel time on most days, though occasional days with particularly good traffic conditions may be faster than this value. TransitAgency
A transit agency that operates a transit line.
Fieldsname
string
The name of this transit agency.
phone_number
string
The transit agency's locale-specific formatted phone number.
uri
string
The transit agency's URI.
TransitLineContains information about the transit line used in this step.
Fieldsagencies[]
The transit agency (or agencies) that operates this transit line.
name
string
The full name of this transit line, For example, "8 Avenue Local".
uri
string
the URI for this transit line as provided by the transit agency.
color
string
The color commonly used in signage for this line. Represented in hexadecimal.
icon_uri
string
The URI for the icon associated with this line.
name_short
string
The short name of this transit line. This name will normally be a line number, such as "M7" or "355".
text_color
string
The color commonly used in text on signage for this line. Represented in hexadecimal.
vehicle
The type of vehicle that operates on this transit line.
TransitPreferencesPreferences for TRANSIT
based routes that influence the route that is returned.
allowed_travel_modes[]
A set of travel modes to use when getting a TRANSIT
route. Defaults to all supported modes of travel.
routing_preference
A routing preference that, when specified, influences the TRANSIT
route returned.
Specifies routing preferences for transit routes.
EnumsTRANSIT_ROUTING_PREFERENCE_UNSPECIFIED
No preference specified. LESS_WALKING
Indicates that the calculated route should prefer limited amounts of walking. FEWER_TRANSFERS
Indicates that the calculated route should prefer a limited number of transfers. TransitTravelMode
A set of values used to specify the mode of transit.
EnumsTRANSIT_TRAVEL_MODE_UNSPECIFIED
No transit travel mode specified. BUS
Travel by bus. SUBWAY
Travel by subway. TRAIN
Travel by train. LIGHT_RAIL
Travel by light rail or tram. RAIL
Travel by rail. This is equivalent to a combination of SUBWAY
, TRAIN
, and LIGHT_RAIL
. TransitStop
Information about a transit stop.
Fieldsname
string
The name of the transit stop.
location
The location of the stop expressed in latitude/longitude coordinates.
TransitVehicleInformation about a vehicle used in transit routes.
Fieldsname
The name of this vehicle, capitalized.
type
The type of vehicle used.
icon_uri
string
The URI for an icon associated with this vehicle type.
local_icon_uri
string
The URI for the icon associated with this vehicle type, based on the local transport signage.
TransitVehicleTypeThe type of vehicles for transit routes.
EnumsTRANSIT_VEHICLE_TYPE_UNSPECIFIED
Unused. BUS
Bus. CABLE_CAR
A vehicle that operates on a cable, usually on the ground. Aerial cable cars may be of the type GONDOLA_LIFT
. COMMUTER_TRAIN
Commuter rail. FERRY
Ferry. FUNICULAR
A vehicle that is pulled up a steep incline by a cable. A Funicular typically consists of two cars, with each car acting as a counterweight for the other. GONDOLA_LIFT
An aerial cable car. HEAVY_RAIL
Heavy rail. HIGH_SPEED_TRAIN
High speed train. INTERCITY_BUS
Intercity bus. LONG_DISTANCE_TRAIN
Long distance train. METRO_RAIL
Light rail transit. MONORAIL
Monorail. OTHER
All other vehicles. RAIL
Rail. SHARE_TAXI
Share taxi is a kind of bus with the ability to drop off and pick up passengers anywhere on its route. SUBWAY
Underground light rail. TRAM
Above ground light rail. TROLLEYBUS
Trolleybus. Units
A set of values that specify the unit of measure used in the display.
EnumsUNITS_UNSPECIFIED
Units of measure not specified. Defaults to the unit of measure inferred from the request. METRIC
Metric units of measure. IMPERIAL
Imperial (English) units of measure. VehicleEmissionType
A set of values describing the vehicle's emission type. Applies only to the DRIVE
.RouteTravelMode
VEHICLE_EMISSION_TYPE_UNSPECIFIED
No emission type specified. Default to GASOLINE
. GASOLINE
Gasoline/petrol fueled vehicle. ELECTRIC
Electricity powered vehicle. HYBRID
Hybrid fuel (such as gasoline + electric) vehicle. DIESEL
Diesel fueled vehicle. VehicleInfo
Contains the vehicle information, such as the vehicle emission type.
WaypointEncapsulates a waypoint. Waypoints mark both the beginning and end of a route, and include intermediate stops along the route.
Fieldsvia
bool
Marks this waypoint as a milestone rather a stopping point. For each non-via waypoint in the request, the response appends an entry to the
array to provide the details for stopovers on that leg of the trip. Set this value to true when you want the route to pass through this waypoint without stopping over. Via waypoints don't cause an entry to be added to the legs
legs
array, but they do route the journey through the waypoint. You can only set this value on waypoints that are intermediates. The request fails if you set this field on terminal waypoints. If ComputeRoutesRequest.optimize_waypoint_order
is set to true then this field cannot be set to true; otherwise, the request fails.
vehicle_stopover
bool
Indicates that the waypoint is meant for vehicles to stop at, where the intention is to either pickup or drop-off. When you set this value, the calculated route won't include non-via
waypoints on roads that are unsuitable for pickup and drop-off. This option works only for DRIVE
and TWO_WHEELER
travel modes, and when the location_type
is
.Location
side_of_road
bool
Indicates that the location of this waypoint is meant to have a preference for the vehicle to stop at a particular side of road. When you set this value, the route will pass through the location so that the vehicle can stop at the side of road that the location is biased towards from the center of the road. This option works only for DRIVE
and TWO_WHEELER
.RouteTravelMode
location_type
. Different ways to represent a location. location_type
can be only one of the following: location
A point specified using geographic coordinates, including an optional heading.
place_id
string
The POI Place ID associated with the waypoint.
address
string
Human readable address or a plus code. See https://plus.codes for details.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4