Options
All
  • Public
  • Public/Protected
  • All
Menu

A directions query to be sent to the DirectionsService.

Hierarchy

  • DirectionsRequest

Index

Properties

avoidFerries?: boolean

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

avoidHighways?: boolean

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

avoidTolls?: boolean

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

destination: string | LatLng | LatLngLiteral | google.maps.Place

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

drivingOptions?: DrivingOptions

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

language?: null | string

A language identifier for the language in which results should be returned, when possible. See the list of supported languages.

optimizeWaypoints?: boolean

If 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: string | LatLng | LatLngLiteral | google.maps.Place

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

provideRouteAlternatives?: boolean

Whether or not route alternatives should be provided. Optional.

region?: null | string

Region code used as a bias for geocoding requests. The region code accepts a ccTLD ("top-level domain") two-character value. Most ccTLD codes are identical to ISO 3166-1 codes, with some notable exceptions. For example, the United Kingdom's ccTLD is "uk" (.co.uk) while its ISO 3166-1 code is "gb" (technically for the entity of "The United Kingdom of Great Britain and Northern Ireland").

transitOptions?: TransitOptions

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

travelMode: TravelMode

Type of routing requested. Required.

unitSystem?: UnitSystem

Preferred unit system to use when displaying distance.

defaultvalue

The unit system used in the country of origin.

waypoints?: DirectionsWaypoint[]

Array 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.

Generated using TypeDoc