google.maps.DirectionsRequest
interface
A directions query to be sent to the DirectionsService.
| Properties | |
|---|---|
avoidFerries |
Type:
boolean optionalIf true, instructs the Directions service to avoid ferries where possible. Optional. |
avoidHighways |
Type:
boolean optionalIf true, instructs the Directions service to avoid highways where possible. Optional. |
avoidTolls |
Type:
boolean optionalIf true, instructs the Directions service to avoid toll roads where possible. Optional. |
destination |
Type:
string|LatLng|Place|LatLngLiteralLocation of destination. This can be specified as either a string to be geocoded, or a LatLng, or a Place. Required. |
drivingOptions |
Type:
DrivingOptions optionalSettings that apply only to requests where travelMode is DRIVING. This object will have no effect for other travel modes. |
optimizeWaypoints |
Type:
boolean optionalIf set to true, the DirectionsService will attempt to re-order the supplied intermediate waypoints to minimize overall cost of the route. If waypoints are optimized, inspect DirectionsRoute.waypoint_order in the response to determine the new ordering. |
origin |
Type:
string|LatLng|Place|LatLngLiteralLocation of origin. This can be specified as either a string to be geocoded, or a LatLng, or a Place. Required. |
provideRouteAlternatives |
Type:
boolean optionalWhether or not route alternatives should be provided. Optional. |
region |
Type:
string optionalRegion code used as a bias for geocoding requests. Optional. |
transitOptions |
Type:
TransitOptions optionalSettings that apply only to requests where travelMode is TRANSIT. This object will have no effect for other travel modes. |
travelMode |
Type:
TravelModeType of routing requested. Required. |
unitSystem |
Type:
UnitSystem optionalPreferred unit system to use when displaying distance. Defaults to the unit system used in the country of origin. |
waypoints |
Type:
Array<DirectionsWaypoint> optionalArray of intermediate waypoints. Directions are calculated from the origin to the destination by way of each waypoint in this array. See the developer's guide for the maximum number of waypoints allowed. Waypoints are not supported for transit directions. Optional. |