Options
All
  • Public
  • Public/Protected
  • All
Menu

A directions query to be sent to the DirectionsService.

Hierarchy

  • DirectionsRequest

Index

Properties

Optional avoidFerries

avoidFerries: undefined | boolean

If true, instructs the Directions service to avoid ferries where possible. Optional.

Optional avoidHighways

avoidHighways: undefined | boolean

If true, instructs the Directions service to avoid highways where possible. Optional.

Optional avoidTolls

avoidTolls: undefined | boolean

If true, instructs the Directions service to avoid toll roads where possible. Optional.

Optional destination

destination: undefined | string | LatLng | LatLngLiteral | Place

Location of destination. This can be specified as either a string to be geocoded, or a LatLng, or a Place. Required.

Optional drivingOptions

drivingOptions: undefined | DrivingOptions

Settings that apply only to requests where travelMode is DRIVING. This object will have no effect for other travel modes.

Optional durationInTraffic

durationInTraffic: undefined | boolean

Deprecated. Use drivingOptions field instead

Optional optimizeWaypoints

optimizeWaypoints: undefined | boolean

If set to true, the DirectionService 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.

Optional origin

origin: undefined | string | LatLng | LatLngLiteral | Place

Location of origin. This can be specified as either a string to be geocoded, or a LatLng, or a Place. Required.

Optional provideRouteAlternatives

provideRouteAlternatives: undefined | boolean

Whether or not route alternatives should be provided. Optional.

Optional region

region: undefined | string

Region code used as a bias for geocoding requests. Optional.

Optional transitOptions

transitOptions: undefined | TransitOptions

Settings that apply only to requests where travelMode is TRANSIT. This object will have no effect for other travel modes.

Optional travelMode

travelMode: undefined | BICYCLING | DRIVING | TRANSIT | TWO_WHEELER | WALKING

Type of routing requested. Required.

Optional unitSystem

unitSystem: undefined | METRIC | IMPERIAL

Preferred unit system to use when displaying distance. Defaults to the unit system used in the country of origin.

Optional waypoints

waypoints: undefined | DirectionsWaypoint[]

Array of intermediate waypoints. Directions will be calculated from the origin to the destination by way of each waypoint in this array. The maximum allowed waypoints is 8, plus the origin, and destination. Premium Plan customers are allowed 23 waypoints, plus the origin, and destination. Waypoints are not supported for transit directions. Optional.

Generated using TypeDoc