Types for Google Maps Routing v2 API¶
- class google.maps.routing_v2.types.ComputeRouteMatrixRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ComputeRouteMatrix request message
- origins¶
Required. Array of origins, which determines the rows of the response matrix. Several size restrictions apply to the cardinality of origins and destinations:
The sum of the number of origins + the number of destinations specified as either
place_id
oraddress
must be no greater than 50.The product of number of origins × number of destinations must be no greater than 625 in any case.
The product of the number of origins × number of destinations must be no greater than 100 if routing_preference is set to
TRAFFIC_AWARE_OPTIMAL
.The product of the number of origins × number of destinations must be no greater than 100 if travel_mode is set to
TRANSIT
.
- Type
MutableSequence[google.maps.routing_v2.types.RouteMatrixOrigin]
- destinations¶
Required. Array of destinations, which determines the columns of the response matrix.
- Type
MutableSequence[google.maps.routing_v2.types.RouteMatrixDestination]
- 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
isDRIVE
orTWO_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 [RouteTravelMode
][google.maps.routing.v2.RouteTravelMode] is set toTRANSIT
.
- arrival_time¶
Optional. The arrival time. NOTE: Can only be set when [
RouteTravelMode
][google.maps.routing.v2.RouteTravelMode] is set toTRANSIT
. You can specify eitherdeparture_time
orarrival_time
, but not both.
- language_code¶
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.
- Type
- region_code¶
Optional. The region code, specified as a ccTLD (“top-level domain”) two-character value. For more information see Country code top-level domains.
- Type
- units¶
Optional. Specifies the units of measure for the display fields.
- extra_computations¶
Optional. A list of extra computations which may be used to complete the request. Note: These extra computations may return extra fields on the response. These extra fields must also be specified in the field mask to be returned in the response.
- Type
MutableSequence[google.maps.routing_v2.types.ComputeRouteMatrixRequest.ExtraComputation]
- 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][google.maps.routing.v2.RouteMatrixElement] which contains the predicted time in traffic based on historical averages. [RoutingPreference][google.maps.routing.v2.RoutingPreference] to
TRAFFIC_AWARE_OPTIMAL
and [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] toDRIVE
. Defaults toBEST_GUESS
if traffic is requested andTrafficModel
is not specified.
- transit_preferences¶
Optional. Specifies preferences that influence the route returned for
TRANSIT
routes. NOTE: You can only specify atransit_preferences
when [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] is set toTRANSIT
.
- class ExtraComputation(value)[source]¶
Bases:
proto.enums.Enum
Extra computations to perform while completing the request.
- Values:
- EXTRA_COMPUTATION_UNSPECIFIED (0):
Not used. Requests containing this value will fail.
- TOLLS (1):
Toll information for the matrix element(s).
- class google.maps.routing_v2.types.ComputeRoutesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ComputeRoutes request message.
- origin¶
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.
- Type
MutableSequence[google.maps.routing_v2.types.Waypoint]
- 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
isDRIVE
orTWO_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 [RouteTravelMode
][google.maps.routing.v2.RouteTravelMode] is set toTRANSIT
. 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: Can only be set when [RouteTravelMode][google.maps.routing.v2.RouteTravelMode] is set to
TRANSIT
. You can specify eitherdeparture_time
orarrival_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¶
Optional. Specifies whether to calculate alternate routes in addition to the route. No alternative routes are returned for requests that have intermediate waypoints.
- Type
- route_modifiers¶
Optional. A set of conditions to satisfy that affect the way routes are calculated.
- language_code¶
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.
- Type
- region_code¶
Optional. The region code, specified as a ccTLD (“top-level domain”) two-character value. For more information see Country code top-level domains.
- Type
- units¶
Optional. Specifies the units of measure for the display fields. These fields include the
instruction
field in [NavigationInstruction
][google.maps.routing.v2.NavigationInstruction]. 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.
- optimize_waypoint_order¶
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. UseComputeRoutesResponse.Routes.optimized_intermediate_waypoint_index
to find the new ordering. IfComputeRoutesResponseroutes.optimized_intermediate_waypoint_index
is not requested in theX-Goog-FieldMask
header, the request fails. Ifoptimize_waypoint_order
is set to false,ComputeRoutesResponse.optimized_intermediate_waypoint_index
will be empty.- Type
- 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 [route_labels
][google.maps.routing.v2.Route.route_labels] on the resulting routes.- Type
MutableSequence[google.maps.routing_v2.types.ComputeRoutesRequest.ReferenceRoute]
- extra_computations¶
Optional. A list of extra computations which may be used to complete the request. Note: These extra computations may return extra fields on the response. These extra fields must also be specified in the field mask to be returned in the response.
- Type
MutableSequence[google.maps.routing_v2.types.ComputeRoutesRequest.ExtraComputation]
- 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 [
Route
][google.maps.routing.v2.Route] and [RouteLeg
][google.maps.routing.v2.RouteLeg] which contains the predicted time in traffic based on historical averages.TrafficModel
is only available for requests that have set [RoutingPreference
][google.maps.routing.v2.RoutingPreference] toTRAFFIC_AWARE_OPTIMAL
and [RouteTravelMode
][google.maps.routing.v2.RouteTravelMode] toDRIVE
. Defaults toBEST_GUESS
if traffic is requested andTrafficModel
is not specified.
- transit_preferences¶
Optional. Specifies preferences that influence the route returned for
TRANSIT
routes. NOTE: You can only specify atransit_preferences
when [RouteTravelMode
][google.maps.routing.v2.RouteTravelMode] is set toTRANSIT
.
- class ExtraComputation(value)[source]¶
Bases:
proto.enums.Enum
Extra computations to perform while completing the request.
- Values:
- EXTRA_COMPUTATION_UNSPECIFIED (0):
Not used. Requests containing this value will fail.
- TOLLS (1):
Toll information for the route(s).
- FUEL_CONSUMPTION (2):
Estimated fuel consumption for the route(s).
- TRAFFIC_ON_POLYLINE (3):
Traffic aware polylines for the route(s).
- HTML_FORMATTED_NAVIGATION_INSTRUCTIONS (4):
`NavigationInstructions
<google.maps.routing.v2.NavigationInstructions.instructions>`__ presented as a formatted HTML text string. This content is meant to be read as-is. This content is for display only. Do not programmatically parse it.- FLYOVER_INFO_ON_POLYLINE (7):
Flyover information for the route(s). The
routes.polyline_details.flyover_info
fieldmask must be specified to return this information. This data will only currently be populated for certain metros in India. This feature is experimental, and the SKU/charge is subject to change.- NARROW_ROAD_INFO_ON_POLYLINE (8):
Narrow road information for the route(s). The
routes.polyline_details.narrow_road_info
fieldmask must be specified to return this information. This data will only currently be populated for certain metros in India. This feature is experimental, and the SKU/charge is subject to change.
- class ReferenceRoute(value)[source]¶
Bases:
proto.enums.Enum
A supported reference route on the ComputeRoutesRequest.
- Values:
- REFERENCE_ROUTE_UNSPECIFIED (0):
Not used. Requests containing this value fail.
- FUEL_EFFICIENT (1):
Fuel efficient route.
- SHORTER_DISTANCE (2):
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
andTWO_WHEELER
requests, this feature returns routes similar to those returned when you don’t specifyrequested_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 anyrouting_preference
.
- class google.maps.routing_v2.types.ComputeRoutesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ComputeRoutes the response message.
- routes¶
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.- Type
MutableSequence[google.maps.routing_v2.types.Route]
- 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.
- class google.maps.routing_v2.types.FallbackInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information 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.
- routing_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.
- class google.maps.routing_v2.types.FallbackReason(value)[source]¶
Bases:
proto.enums.Enum
Reasons for using fallback response.
- Values:
- FALLBACK_REASON_UNSPECIFIED (0):
No fallback reason specified.
- SERVER_ERROR (1):
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 (2):
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.
- class google.maps.routing_v2.types.FallbackRoutingMode(value)[source]¶
Bases:
proto.enums.Enum
Actual routing mode used for returned fallback response.
- Values:
- FALLBACK_ROUTING_MODE_UNSPECIFIED (0):
Not used.
- FALLBACK_TRAFFIC_UNAWARE (1):
Indicates the
TRAFFIC_UNAWARE
[RoutingPreference
][google.maps.routing.v2.RoutingPreference] was used to compute the response.- FALLBACK_TRAFFIC_AWARE (2):
Indicates the
TRAFFIC_AWARE
[RoutingPreference
][google.maps.routing.v2.RoutingPreference] was used to compute the response.
- class google.maps.routing_v2.types.GeocodedWaypoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- geocoder_status¶
Indicates the status code resulting from the geocoding operation.
- Type
google.rpc.status_pb2.Status
- intermediate_waypoint_request_index¶
The index of the corresponding intermediate waypoint in the request. Only populated if the corresponding waypoint is an intermediate waypoint.
This field is a member of oneof
_intermediate_waypoint_request_index
.- Type
- type_¶
The type(s) of the result, in the form of zero or more type tags. Supported types: Address types and address component types.
- Type
MutableSequence[str]
- partial_match¶
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.
- Type
- class google.maps.routing_v2.types.GeocodingResults(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains [
GeocodedWaypoints
][google.maps.routing.v2.GeocodedWaypoint] for origin, destination and intermediate waypoints. Only populated for address waypoints.- 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.
- Type
MutableSequence[google.maps.routing_v2.types.GeocodedWaypoint]
- class google.maps.routing_v2.types.LocalizedTime(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Localized description of time.
- time¶
The time specified as a string in a given time zone.
- Type
google.type.localized_text_pb2.LocalizedText
- time_zone¶
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”.
- Type
- class google.maps.routing_v2.types.Location(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates a location (a geographic point, and an optional heading).
- lat_lng¶
The waypoint’s geographic coordinates.
- Type
google.type.latlng_pb2.LatLng
- 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
andTWO_WHEELER
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].
- class google.maps.routing_v2.types.Maneuver(value)[source]¶
Bases:
proto.enums.Enum
A set of values that specify the navigation action to take for the current step (for example, turn left, merge, or straight).
- Values:
- MANEUVER_UNSPECIFIED (0):
Not used.
- TURN_SLIGHT_LEFT (1):
Turn slightly to the left.
- TURN_SHARP_LEFT (2):
Turn sharply to the left.
- UTURN_LEFT (3):
Make a left u-turn.
- TURN_LEFT (4):
Turn left.
- TURN_SLIGHT_RIGHT (5):
Turn slightly to the right.
- TURN_SHARP_RIGHT (6):
Turn sharply to the right.
- UTURN_RIGHT (7):
Make a right u-turn.
- TURN_RIGHT (8):
Turn right.
- STRAIGHT (9):
Go straight.
- RAMP_LEFT (10):
Take the left ramp.
- RAMP_RIGHT (11):
Take the right ramp.
- MERGE (12):
Merge into traffic.
- FORK_LEFT (13):
Take the left fork.
- FORK_RIGHT (14):
Take the right fork.
- FERRY (15):
Take the ferry.
- FERRY_TRAIN (16):
Take the train leading onto the ferry.
- ROUNDABOUT_LEFT (17):
Turn left at the roundabout.
- ROUNDABOUT_RIGHT (18):
Turn right at the roundabout.
- DEPART (19):
Initial maneuver.
- NAME_CHANGE (20):
Used to indicate a street name change.
Bases:
proto.message.Message
Encapsulates navigation instructions for a [
RouteLegStep
][google.maps.routing.v2.RouteLegStep].Encapsulates the navigation instructions for the current step (for example, turn left, merge, or straight). This field determines which icon to display.
Instructions for navigating this step.
- Type
- class google.maps.routing_v2.types.Polyline(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates an encoded polyline.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- encoded_polyline¶
The string encoding of the polyline using the polyline encoding algorithm
This field is a member of oneof
polyline_type
.- Type
- geo_json_linestring¶
Specifies a polyline using the GeoJSON LineString format.
This field is a member of oneof
polyline_type
.
- class google.maps.routing_v2.types.PolylineDetails(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Details 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.
- Type
MutableSequence[google.maps.routing_v2.types.PolylineDetails.FlyoverInfo]
- narrow_road_info¶
Narrow road details along the polyline.
- Type
MutableSequence[google.maps.routing_v2.types.PolylineDetails.NarrowRoadInfo]
- class FlyoverInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates information about flyovers along the polyline.
- flyover_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.
- class NarrowRoadInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates information about narrow roads along the polyline.
- narrow_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.
- class PolylinePointIndex(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates the start and end indexes for a polyline detail. For instances where the data corresponds to a single point,
start_index
andend_index
will be equal.
- class RoadFeatureState(value)[source]¶
Bases:
proto.enums.Enum
Encapsulates the states of road features along a stretch of polyline.
- Values:
- ROAD_FEATURE_STATE_UNSPECIFIED (0):
The road feature’s state was not computed (default value).
- EXISTS (1):
The road feature exists.
- DOES_NOT_EXIST (2):
The road feature does not exist.
- class google.maps.routing_v2.types.PolylineEncoding(value)[source]¶
Bases:
proto.enums.Enum
Specifies the preferred type of polyline to be returned.
- Values:
- POLYLINE_ENCODING_UNSPECIFIED (0):
No polyline type preference specified. Defaults to
ENCODED_POLYLINE
.- ENCODED_POLYLINE (1):
Specifies a polyline encoded using the polyline encoding algorithm.
- GEO_JSON_LINESTRING (2):
Specifies a polyline using the GeoJSON LineString format
- class google.maps.routing_v2.types.PolylineQuality(value)[source]¶
Bases:
proto.enums.Enum
A set of values that specify the quality of the polyline.
- Values:
- POLYLINE_QUALITY_UNSPECIFIED (0):
No polyline quality preference specified. Defaults to
OVERVIEW
.- HIGH_QUALITY (1):
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 (2):
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.
- class google.maps.routing_v2.types.Route(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains a route, which consists of a series of connected road segments that join beginning, ending, and intermediate waypoints.
- route_labels¶
Labels for the
Route
that are useful to identify specific properties of the route to compare against others.- Type
MutableSequence[google.maps.routing_v2.types.RouteLabel]
- legs¶
A collection of legs (path segments between waypoints) that make up the route. Each leg corresponds to the trip between two non-
via
[Waypoints
][google.maps.routing.v2.Waypoint]. For example, a route with no intermediate waypoints has only one leg. A route that includes one non-via
intermediate waypoint has two legs. A route that includes onevia
intermediate waypoint has one leg. The order of the legs matches the order of waypoints fromorigin
tointermediates
todestination
.- Type
MutableSequence[google.maps.routing_v2.types.RouteLeg]
- duration¶
The length of time needed to navigate the route. If you set the
routing_preference
toTRAFFIC_UNAWARE
, then this value is the same asstatic_duration
. If you set therouting_preference
to eitherTRAFFIC_AWARE
orTRAFFIC_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
.
- viewport¶
The viewport bounding box of the polyline.
- Type
google.geo.type.types.Viewport
- travel_advisory¶
Additional information about the route.
- optimized_intermediate_waypoint_index¶
If you set [
optimize_waypoint_order
][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order] 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.- Type
MutableSequence[int]
- localized_values¶
Text representations of properties of the
Route
.
- route_token¶
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 setComputeRoutesRequest.routing_preference
toTRAFFIC_AWARE
orTRAFFIC_AWARE_OPTIMAL
.Route.route_token
is not supported for requests that have Via waypoints.- Type
- polyline_details¶
Contains information about details along the polyline.
- class RouteLocalizedValues(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Text representations of certain properties.
- distance¶
Travel distance represented in text form.
- Type
google.type.localized_text_pb2.LocalizedText
- 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
.- Type
google.type.localized_text_pb2.LocalizedText
- static_duration¶
Duration without taking traffic conditions into consideration, represented in text form.
- Type
google.type.localized_text_pb2.LocalizedText
- transit_fare¶
Transit fare represented in text form.
- Type
google.type.localized_text_pb2.LocalizedText
- class google.maps.routing_v2.types.RouteLabel(value)[source]¶
Bases:
proto.enums.Enum
Labels for the [
Route
][google.maps.routing.v2.Route] that are useful to identify specific properties of the route to compare against others.- Values:
- ROUTE_LABEL_UNSPECIFIED (0):
Default - not used.
- DEFAULT_ROUTE (1):
The default “best” route returned for the route computation.
- DEFAULT_ROUTE_ALTERNATE (2):
An alternative to the default “best” route. Routes like this will be returned when [
compute_alternative_routes
][google.maps.routing.v2.ComputeRoutesRequest.compute_alternative_routes] is specified.- FUEL_EFFICIENT (3):
Fuel efficient route. Routes labeled with this value are determined to be optimized for Eco parameters such as fuel consumption.
- SHORTER_DISTANCE (4):
Shorter travel distance route. This is an experimental feature.
- class google.maps.routing_v2.types.RouteLeg(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains a segment between non-
via
waypoints.- duration¶
The length of time needed to navigate the leg. If the
route_preference
is set toTRAFFIC_UNAWARE
, then this value is the same asstatic_duration
. If theroute_preference
is eitherTRAFFIC_AWARE
orTRAFFIC_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 providedorigin
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 provideddestination
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.
- Type
MutableSequence[google.maps.routing_v2.types.RouteLegStep]
- 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.
- class RouteLegLocalizedValues(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Text representations of certain properties.
- distance¶
Travel distance represented in text form.
- Type
google.type.localized_text_pb2.LocalizedText
- 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.
- Type
google.type.localized_text_pb2.LocalizedText
- static_duration¶
Duration without taking traffic conditions into consideration, represented in text form.
- Type
google.type.localized_text_pb2.LocalizedText
- class StepsOverview(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Provides 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 theRouteLeg
does not contain any multi-modal segments in the steps.- Type
MutableSequence[google.maps.routing_v2.types.RouteLeg.StepsOverview.MultiModalSegment]
- class MultiModalSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Provides summarized information about different multi-modal segments of the
RouteLeg.steps
. A multi-modal segment is defined as one or more contiguousRouteLegStep
that have the sameRouteTravelMode
. This field is not populated if theRouteLeg
does not contain any multi-modal segments in the steps.- step_start_index¶
The corresponding
RouteLegStep
index that is the start of a multi-modal segment.This field is a member of oneof
_step_start_index
.- Type
- step_end_index¶
The corresponding
RouteLegStep
index that is the end of a multi-modal segment.This field is a member of oneof
_step_end_index
.- Type
NavigationInstruction for the multi-modal segment.
- travel_mode¶
The travel mode of the multi-modal segment.
- class google.maps.routing_v2.types.RouteLegStep(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains a segment of a [
RouteLeg
][google.maps.routing.v2.RouteLeg]. A step corresponds to a single navigation instruction. Route legs are made up of steps.- distance_meters¶
The travel distance of this step, in meters. In some circumstances, this field might not have a value.
- Type
- 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 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.
- class RouteLegStepLocalizedValues(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Text representations of certain properties.
- distance¶
Travel distance represented in text form.
- Type
google.type.localized_text_pb2.LocalizedText
- static_duration¶
Duration without taking traffic conditions into consideration, represented in text form.
- Type
google.type.localized_text_pb2.LocalizedText
- class google.maps.routing_v2.types.RouteLegStepTransitDetails(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Additional information for the
RouteLegStep
related toTRANSIT
routes.- stop_details¶
Information about the arrival and departure stops for the step.
- localized_values¶
Text representations of properties of the
RouteLegStepTransitDetails
.
- headsign¶
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.
- Type
- 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¶
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.
- Type
- trip_short_text¶
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.- Type
- class TransitDetailsLocalizedValues(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- class TransitStopDetails(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Details 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.
- class google.maps.routing_v2.types.RouteLegStepTravelAdvisory(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains the additional information that the user should be informed about, such as possible traffic zone restrictions on a leg step.
- speed_reading_intervals¶
NOTE: This field is not currently populated.
- Type
MutableSequence[google.maps.routing_v2.types.SpeedReadingInterval]
- class google.maps.routing_v2.types.RouteLegTravelAdvisory(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains the additional information that the user should be informed about on a leg step, such as possible traffic zone restrictions.
- toll_info¶
Contains information about tolls on the specific
RouteLeg
. This field is only populated if we expect there are tolls on theRouteLeg
. 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 this field does not exist, then there is no toll on theRouteLeg
.
- speed_reading_intervals¶
Speed reading intervals detailing traffic density. Applicable in case of
TRAFFIC_AWARE
andTRAFFIC_AWARE_OPTIMAL
routing preferences. The intervals cover the entire polyline of theRouteLeg
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).
- Type
MutableSequence[google.maps.routing_v2.types.SpeedReadingInterval]
- class google.maps.routing_v2.types.RouteMatrixDestination(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A single destination for ComputeRouteMatrixRequest
- waypoint¶
Required. Destination waypoint
- class google.maps.routing_v2.types.RouteMatrixElement(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains route information computed for an origin/destination pair in the ComputeRouteMatrix API. This proto can be streamed to the client.
- origin_index¶
Zero-based index of the origin in the request.
This field is a member of oneof
_origin_index
.- Type
- destination_index¶
Zero-based index of the destination in the request.
This field is a member of oneof
_destination_index
.- Type
- status¶
Error status code for this element.
- Type
google.rpc.status_pb2.Status
- condition¶
Indicates whether the route was found or not. Independent of status.
- duration¶
The length of time needed to navigate the route. If you set the [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference] to
TRAFFIC_UNAWARE
, then this value is the same asstatic_duration
. If you set therouting_preference
to eitherTRAFFIC_AWARE
orTRAFFIC_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
.
- class LocalizedValues(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Text representations of certain properties.
- distance¶
Travel distance represented in text form.
- Type
google.type.localized_text_pb2.LocalizedText
- 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.
- Type
google.type.localized_text_pb2.LocalizedText
- static_duration¶
Duration represented in text form without taking traffic conditions into consideration.
- Type
google.type.localized_text_pb2.LocalizedText
- transit_fare¶
Transit fare represented in text form.
- Type
google.type.localized_text_pb2.LocalizedText
- class google.maps.routing_v2.types.RouteMatrixElementCondition(value)[source]¶
Bases:
proto.enums.Enum
The condition of the route being returned.
- Values:
- ROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED (0):
Only used when the
status
of the element is not OK.- ROUTE_EXISTS (1):
A route was found, and the corresponding information was filled out for the element.
- ROUTE_NOT_FOUND (2):
No route could be found. Fields containing route information, such as
distance_meters
orduration
, will not be filled out in the element.
- class google.maps.routing_v2.types.RouteMatrixOrigin(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A single origin for ComputeRouteMatrixRequest
- waypoint¶
Required. Origin waypoint
- route_modifiers¶
Optional. Modifiers for every route that takes this as the origin
- class google.maps.routing_v2.types.RouteModifiers(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates a set of optional conditions to satisfy when calculating the routes.
- avoid_tolls¶
When set to true, avoids toll roads where reasonable, giving preference to routes not containing toll roads. Applies only to the
DRIVE
andTWO_WHEELER
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].- Type
- avoid_highways¶
When set to true, avoids highways where reasonable, giving preference to routes not containing highways. Applies only to the
DRIVE
andTWO_WHEELER
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].- Type
- avoid_ferries¶
When set to true, avoids ferries where reasonable, giving preference to routes not containing ferries. Applies only to the
DRIVE
andTWO_WHEELER
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].- Type
- avoid_indoor¶
When set to true, avoids navigating indoors where reasonable, giving preference to routes not containing indoor navigation. Applies only to the
WALK
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].- Type
- 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
andTWO_WHEELER
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].- Type
MutableSequence[google.maps.routing_v2.types.TollPass]
- class google.maps.routing_v2.types.RouteTravelAdvisory(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains the additional information that the user should be informed about, such as possible traffic zone restrictions.
- toll_info¶
Contains information about tolls on the route. This field is only populated if tolls are expected on the route. If this field is set, but the
estimatedPrice
subfield is not populated, then the route contains tolls, but the estimated price is unknown. If this field is not set, then there are no tolls expected on the route.
- speed_reading_intervals¶
Speed reading intervals detailing traffic density. Applicable in case of
TRAFFIC_AWARE
andTRAFFIC_AWARE_OPTIMAL
routing preferences. 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).
- Type
MutableSequence[google.maps.routing_v2.types.SpeedReadingInterval]
- route_restrictions_partially_ignored¶
Returned route may have restrictions that are not suitable for requested travel mode or route modifiers.
- Type
- 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.- Type
google.type.money_pb2.Money
- class google.maps.routing_v2.types.RouteTravelMode(value)[source]¶
Bases:
proto.enums.Enum
A set of values used to specify the mode of travel. NOTE:
WALK
,BICYCLE
, andTWO_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.- Values:
- TRAVEL_MODE_UNSPECIFIED (0):
No travel mode specified. Defaults to
DRIVE
.- DRIVE (1):
Travel by passenger car.
- BICYCLE (2):
Travel by bicycle.
- WALK (3):
Travel by walking.
- TWO_WHEELER (4):
Two-wheeled, motorized vehicle. For example, motorcycle. Note that this differs from the
BICYCLE
travel mode which covers human-powered mode.- TRANSIT (7):
Travel by public transit routes, where available.
- class google.maps.routing_v2.types.RoutingPreference(value)[source]¶
Bases:
proto.enums.Enum
A set of values that specify factors to take into consideration when calculating the route.
- Values:
- ROUTING_PREFERENCE_UNSPECIFIED (0):
No routing preference specified. Default to
TRAFFIC_UNAWARE
.- TRAFFIC_UNAWARE (1):
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
][google.maps.routing.v2.RouteTravelMode]DRIVE
andTWO_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 (2):
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 (3):
Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.
- class google.maps.routing_v2.types.SpeedReadingInterval(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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¶
The starting index of this interval in the polyline.
This field is a member of oneof
_start_polyline_point_index
.- Type
- end_polyline_point_index¶
The ending index of this interval in the polyline.
This field is a member of oneof
_end_polyline_point_index
.- Type
- class Speed(value)[source]¶
Bases:
proto.enums.Enum
The classification of polyline speed based on traffic data.
- Values:
- SPEED_UNSPECIFIED (0):
Default value. This value is unused.
- NORMAL (1):
Normal speed, no slowdown is detected.
- SLOW (2):
Slowdown detected, but no traffic jam formed.
- TRAFFIC_JAM (3):
Traffic jam detected.
- class google.maps.routing_v2.types.TollInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates toll information on a [
Route
][google.maps.routing.v2.Route] or on a [RouteLeg
][google.maps.routing.v2.RouteLeg].- estimated_price¶
The monetary amount of tolls for the corresponding [
Route
][google.maps.routing.v2.Route] or [RouteLeg
][google.maps.routing.v2.RouteLeg]. 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.- Type
MutableSequence[google.type.money_pb2.Money]
- class google.maps.routing_v2.types.TollPass(value)[source]¶
Bases:
proto.enums.Enum
List of toll passes around the world that we support.
- Values:
- TOLL_PASS_UNSPECIFIED (0):
Not used. If this value is used, then the request fails.
- AU_ETOLL_TAG (82):
Sydney toll pass. See additional details at https://www.myetoll.com.au.
- AU_EWAY_TAG (83):
Sydney toll pass. See additional details at https://www.tollpay.com.au.
- AU_LINKT (2):
Australia-wide toll pass. See additional details at https://www.linkt.com.au/.
- AR_TELEPASE (3):
Argentina toll pass. See additional details at https://telepase.com.ar
- BR_AUTO_EXPRESO (81):
Brazil toll pass. See additional details at https://www.autoexpreso.com
- BR_CONECTCAR (7):
Brazil toll pass. See additional details at https://conectcar.com.
- BR_MOVE_MAIS (8):
Brazil toll pass. See additional details at https://movemais.com.
- BR_PASSA_RAPIDO (88):
Brazil toll pass. See additional details at https://pasorapido.gob.do/
- BR_SEM_PARAR (9):
Brazil toll pass. See additional details at https://www.semparar.com.br.
- BR_TAGGY (10):
Brazil toll pass. See additional details at https://taggy.com.br.
- BR_VELOE (11):
Brazil toll pass. See additional details at https://veloe.com.br/site/onde-usar.
- CA_US_AKWASASNE_SEAWAY_CORPORATE_CARD (84):
Canada to United States border crossing.
- CA_US_AKWASASNE_SEAWAY_TRANSIT_CARD (85):
Canada to United States border crossing.
- CA_US_BLUE_WATER_EDGE_PASS (18):
Ontario, Canada to Michigan, United States border crossing.
- CA_US_CONNEXION (19):
Ontario, Canada to Michigan, United States border crossing.
- CA_US_NEXUS_CARD (20):
Canada to United States border crossing.
- ID_E_TOLL (16):
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.
- IN_FASTAG (78):
India.
- IN_LOCAL_HP_PLATE_EXEMPT (79):
India, HP state plate exemption.
- JP_ETC (98):
Japan ETC. Electronic wireless system to collect tolls. https://www.go-etc.jp/
- JP_ETC2 (99):
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 (90):
Mexico toll pass. https://iave.capufe.gob.mx/#/
- MX_PASE (91):
Mexico https://www.pase.com.mx
- MX_QUICKPASS (93):
- MX_SISTEMA_TELEPEAJE_CHIHUAHUA (89):
http://appsh.chihuahua.gob.mx/transparencia/?doc=/ingresos/TelepeajeFormato4.pdf
- MX_TAG_IAVE (12):
Mexico
- MX_TAG_TELEVIA (13):
Mexico toll pass company. One of many operating in Mexico City. See additional details at https://www.televia.com.mx.
- MX_TELEVIA (92):
Mexico toll pass company. One of many operating in Mexico City. https://www.televia.com.mx
- MX_VIAPASS (14):
Mexico toll pass. See additional details at https://www.viapass.com.mx/viapass/web_home.aspx.
- US_AL_FREEDOM_PASS (21):
AL, USA.
- US_AK_ANTON_ANDERSON_TUNNEL_BOOK_OF_10_TICKETS (22):
AK, USA.
- US_CA_FASTRAK (4):
CA, USA.
- US_CA_FASTRAK_CAV_STICKER (86):
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 (23):
CO, USA.
- US_CO_GO_PASS (24):
CO, USA.
- US_DE_EZPASSDE (25):
DE, USA.
- US_FL_BOB_SIKES_TOLL_BRIDGE_PASS (65):
FL, USA.
- US_FL_DUNES_COMMUNITY_DEVELOPMENT_DISTRICT_EXPRESSCARD (66):
FL, USA.
- US_FL_EPASS (67):
FL, USA.
- US_FL_GIBA_TOLL_PASS (68):
FL, USA.
- US_FL_LEEWAY (69):
FL, USA.
- US_FL_SUNPASS (70):
FL, USA.
- US_FL_SUNPASS_PRO (71):
FL, USA.
- US_IL_EZPASSIL (73):
IL, USA.
- US_IL_IPASS (72):
IL, USA.
- US_IN_EZPASSIN (26):
IN, USA.
- US_KS_BESTPASS_HORIZON (27):
KS, USA.
- US_KS_KTAG (28):
KS, USA.
- US_KS_NATIONALPASS (29):
KS, USA.
- US_KS_PREPASS_ELITEPASS (30):
KS, USA.
- US_KY_RIVERLINK (31):
KY, USA.
- US_LA_GEAUXPASS (32):
LA, USA.
- US_LA_TOLL_TAG (33):
LA, USA.
- US_MA_EZPASSMA (6):
MA, USA.
- US_MD_EZPASSMD (34):
MD, USA.
- US_ME_EZPASSME (35):
ME, USA.
- US_MI_AMBASSADOR_BRIDGE_PREMIER_COMMUTER_CARD (36):
MI, USA.
- US_MI_BCPASS (94):
MI, USA.
- US_MI_GROSSE_ILE_TOLL_BRIDGE_PASS_TAG (37):
MI, USA.
- US_MI_IQ_PROX_CARD (38):
MI, USA. Deprecated as this pass type no longer exists.
- US_MI_IQ_TAG (95):
MI, USA.
- US_MI_MACKINAC_BRIDGE_MAC_PASS (39):
MI, USA.
- US_MI_NEXPRESS_TOLL (40):
MI, USA.
- US_MN_EZPASSMN (41):
MN, USA.
- US_NC_EZPASSNC (42):
NC, USA.
- US_NC_PEACH_PASS (87):
NC, USA.
- US_NC_QUICK_PASS (43):
NC, USA.
- US_NH_EZPASSNH (80):
NH, USA.
- US_NJ_DOWNBEACH_EXPRESS_PASS (75):
NJ, USA.
- US_NJ_EZPASSNJ (74):
NJ, USA.
- US_NY_EXPRESSPASS (76):
NY, USA.
- US_NY_EZPASSNY (77):
NY, USA.
- US_OH_EZPASSOH (44):
OH, USA.
- US_PA_EZPASSPA (45):
PA, USA.
- US_RI_EZPASSRI (46):
RI, USA.
- US_SC_PALPASS (47):
SC, USA.
- US_TX_AVI_TAG (97):
TX, USA.
- US_TX_BANCPASS (48):
TX, USA.
- US_TX_DEL_RIO_PASS (49):
TX, USA.
- US_TX_EFAST_PASS (50):
TX, USA.
- US_TX_EAGLE_PASS_EXPRESS_CARD (51):
TX, USA.
- US_TX_EPTOLL (52):
TX, USA.
- US_TX_EZ_CROSS (53):
TX, USA.
- US_TX_EZTAG (54):
TX, USA.
- US_TX_FUEGO_TAG (96):
TX, USA.
- US_TX_LAREDO_TRADE_TAG (55):
TX, USA.
- US_TX_PLUSPASS (56):
TX, USA.
- US_TX_TOLLTAG (57):
TX, USA.
- US_TX_TXTAG (58):
TX, USA.
- US_TX_XPRESS_CARD (59):
TX, USA.
- US_UT_ADAMS_AVE_PARKWAY_EXPRESSCARD (60):
UT, USA.
- US_VA_EZPASSVA (61):
VA, USA.
- US_WA_BREEZEBY (17):
WA, USA.
- US_WA_GOOD_TO_GO (1):
WA, USA.
- US_WV_EZPASSWV (62):
WV, USA.
- US_WV_MEMORIAL_BRIDGE_TICKETS (63):
WV, USA.
- US_WV_MOV_PASS (100):
WV, USA
- US_WV_NEWELL_TOLL_BRIDGE_TICKET (64):
WV, USA.
- class google.maps.routing_v2.types.TrafficModel(value)[source]¶
Bases:
proto.enums.Enum
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.- Values:
- TRAFFIC_MODEL_UNSPECIFIED (0):
Unused. If specified, will default to
BEST_GUESS
.- BEST_GUESS (1):
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 thedeparture_time
is to now.- PESSIMISTIC (2):
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 (3):
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.
- class google.maps.routing_v2.types.TransitAgency(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A transit agency that operates a transit line.
- class google.maps.routing_v2.types.TransitLine(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains information about the transit line used in this step.
- agencies¶
The transit agency (or agencies) that operates this transit line.
- Type
MutableSequence[google.maps.routing_v2.types.TransitAgency]
- name_short¶
The short name of this transit line. This name will normally be a line number, such as “M7” or “355”.
- Type
- text_color¶
The color commonly used in text on signage for this line. Represented in hexadecimal.
- Type
- vehicle¶
The type of vehicle that operates on this transit line.
- class google.maps.routing_v2.types.TransitPreferences(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Preferences 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.- Type
MutableSequence[google.maps.routing_v2.types.TransitPreferences.TransitTravelMode]
- routing_preference¶
A routing preference that, when specified, influences the
TRANSIT
route returned.
- class TransitRoutingPreference(value)[source]¶
Bases:
proto.enums.Enum
Specifies routing preferences for transit routes.
- Values:
- TRANSIT_ROUTING_PREFERENCE_UNSPECIFIED (0):
No preference specified.
- LESS_WALKING (1):
Indicates that the calculated route should prefer limited amounts of walking.
- FEWER_TRANSFERS (2):
Indicates that the calculated route should prefer a limited number of transfers.
- class TransitTravelMode(value)[source]¶
Bases:
proto.enums.Enum
A set of values used to specify the mode of transit.
- Values:
- TRANSIT_TRAVEL_MODE_UNSPECIFIED (0):
No transit travel mode specified.
- BUS (1):
Travel by bus.
- SUBWAY (2):
Travel by subway.
- TRAIN (3):
Travel by train.
- LIGHT_RAIL (4):
Travel by light rail or tram.
- RAIL (5):
Travel by rail. This is equivalent to a combination of
SUBWAY
,TRAIN
, andLIGHT_RAIL
.
- class google.maps.routing_v2.types.TransitStop(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about a transit stop.
- location¶
The location of the stop expressed in latitude/longitude coordinates.
- class google.maps.routing_v2.types.TransitVehicle(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information about a vehicle used in transit routes.
- name¶
The name of this vehicle, capitalized.
- Type
google.type.localized_text_pb2.LocalizedText
- type_¶
The type of vehicle used.
- local_icon_uri¶
The URI for the icon associated with this vehicle type, based on the local transport signage.
- Type
- class TransitVehicleType(value)[source]¶
Bases:
proto.enums.Enum
The type of vehicles for transit routes.
- Values:
- TRANSIT_VEHICLE_TYPE_UNSPECIFIED (0):
Unused.
- BUS (1):
Bus.
- CABLE_CAR (2):
A vehicle that operates on a cable, usually on the ground. Aerial cable cars may be of the type
GONDOLA_LIFT
.- COMMUTER_TRAIN (3):
Commuter rail.
- FERRY (4):
Ferry.
- FUNICULAR (5):
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 (6):
An aerial cable car.
- HEAVY_RAIL (7):
Heavy rail.
- HIGH_SPEED_TRAIN (8):
High speed train.
- INTERCITY_BUS (9):
Intercity bus.
- LONG_DISTANCE_TRAIN (10):
Long distance train.
- METRO_RAIL (11):
Light rail transit.
- MONORAIL (12):
Monorail.
- OTHER (13):
All other vehicles.
- RAIL (14):
Rail.
- SHARE_TAXI (15):
Share taxi is a kind of bus with the ability to drop off and pick up passengers anywhere on its route.
- SUBWAY (16):
Underground light rail.
- TRAM (17):
Above ground light rail.
- TROLLEYBUS (18):
Trolleybus.
- class google.maps.routing_v2.types.Units(value)[source]¶
Bases:
proto.enums.Enum
A set of values that specify the unit of measure used in the display.
- Values:
- UNITS_UNSPECIFIED (0):
Units of measure not specified. Defaults to the unit of measure inferred from the request.
- METRIC (1):
Metric units of measure.
- IMPERIAL (2):
Imperial (English) units of measure.
- class google.maps.routing_v2.types.VehicleEmissionType(value)[source]¶
Bases:
proto.enums.Enum
A set of values describing the vehicle’s emission type. Applies only to the
DRIVE
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].- Values:
- VEHICLE_EMISSION_TYPE_UNSPECIFIED (0):
No emission type specified. Default to
GASOLINE
.- GASOLINE (1):
Gasoline/petrol fueled vehicle.
- ELECTRIC (2):
Electricity powered vehicle.
- HYBRID (3):
Hybrid fuel (such as gasoline + electric) vehicle.
- DIESEL (4):
Diesel fueled vehicle.
- class google.maps.routing_v2.types.VehicleInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains the vehicle information, such as the vehicle emission type.
- emission_type¶
Describes the vehicle’s emission type. Applies only to the
DRIVE
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].
- class google.maps.routing_v2.types.Waypoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Encapsulates a waypoint. Waypoints mark both the beginning and end of a route, and include intermediate stops along the route.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- location¶
A point specified using geographic coordinates, including an optional heading.
This field is a member of oneof
location_type
.
- place_id¶
The POI Place ID associated with the waypoint.
This field is a member of oneof
location_type
.- Type
- address¶
Human readable address or a plus code. See https://plus.codes for details.
This field is a member of oneof
location_type
.- Type
- via¶
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 [
legs
][google.maps.routing.v2.Route.legs] 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 thelegs
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. IfComputeRoutesRequest.optimize_waypoint_order
is set to true then this field cannot be set to true; otherwise, the request fails.- Type
- vehicle_stopover¶
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 forDRIVE
andTWO_WHEELER
travel modes, and when thelocation_type
is [Location
][google.maps.routing.v2.Location].- Type
- side_of_road¶
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
andTWO_WHEELER
[RouteTravelMode
][google.maps.routing.v2.RouteTravelMode].- Type