science This product or feature is in the pre-GA Experimental launch stage (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the
Google Maps Platform Service Specific Terms . For more information, see the
launch stage descriptions .
Send feedback
TransitPreferences (Automotive)
Stay organized with collections
Save and categorize content based on your preferences.
Preferences for TRANSIT
based routes that influence the route that is returned.
Fields
allowedTravelModes[]
enum (TransitTravelMode
)
A set of travel modes to use when getting a TRANSIT
route. Defaults to all supported modes of travel.
routingPreference
enum (TransitRoutingPreference
)
A routing preference that, when specified, influences the TRANSIT
route returned.
TransitTravelMode
A set of values used to specify the mode of transit.
Enums
TRANSIT_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
.
TransitRoutingPreference
Specifies routing preferences for transit routes.
Enums
TRANSIT_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.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-16 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?