AI-generated Key Takeaways
- 
          TransitPreferencesinfluence theTRANSITbased routes that are returned.
- 
          You can specify transit travel modes such as BUS,SUBWAY,TRAIN,LIGHT_RAIL, andRAILor use the default of all supported modes.
- 
          TransitPreferencesalso allow you to indicate preferences forLESS_WALKINGorFEWER_TRANSFERSwhen calculating a route.
Preferences for TRANSIT based routes that influence the route that is returned.
| JSON representation | 
|---|
| { "allowedTravelModes": [ enum ( | 
| Fields | |
|---|---|
| allowedTravelModes[] | 
 A set of travel modes to use when getting a  | 
| routingPreference | 
 A routing preference that, when specified, influences the  | 
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, andLIGHT_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. |