google.maps.TransitOptions
interface
The TransitOptions object to be included in a DirectionsRequest when the travel mode is set to TRANSIT.
| Properties | |
|---|---|
arrivalTime |
Type:
Date optionalThe desired arrival time for the route, specified as a Date object. The Date object measures time in milliseconds since 1 January 1970. If arrival time is specified, departure time is ignored. |
departureTime |
Type:
Date optionalThe desired departure time for the route, specified as a Date object. The Date object measures time in milliseconds since 1 January 1970. If neither departure time nor arrival time is specified, the time is assumed to be "now". |
modes |
Type:
Array<TransitMode> optionalOne or more preferred modes of transit, such as bus or train. If no preference is given, the API returns the default best route. |
routingPreference |
Type:
TransitRoutePreference optionalA preference that can bias the choice of transit route, such as less walking. If no preference is given, the API returns the default best route. |