DirectionsWaypoint class

Specifies an intermediate location to include along the route between the origin and destination points as pass through or stopover location. Waypoints alter a route by directing it through the specified location(s).

The API supports waypoints for these travel modes: driving, walking and bicycling; not transit. You can specify waypoints using the following values:

  • location - specifies an intermediate location to include along the route between the origin and destination points. Waypoints alter a route by directing it through the specified location(s).

You can specify waypoints using the following values:

  • Latitude/longitude coordinates (lat/lng): an explicit value pair. (-34.92788%2C138.60008 comma, no space)

  • Place ID: The unique value specific to a location.

  • Address string (Charlestown, Boston,MA)

  • Encoded polyline that can be specified

  • stopover - influence routes with stopover and pass through points For each waypoint in the request, the directions response appends an entry to the legs array to provide the details for stopovers on that leg of the journey.

If you'd like to influence the route using waypoints without adding a stopover, prefix via: will be added to the waypoint. Waypoints prefixed with via: will not add an entry to the legs array, but will route the journey through the waypoint.

Constructors

DirectionsWaypoint({dynamic location, bool stopover = true})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
location → dynamic
Specifies an intermediate location to include along the route between the origin and destination points. Waypoints alter a route by directing it through the specified location(s).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stopover bool
Influence routes with stopover and pass through points For each waypoint in the request, the directions response appends an entry to the legs array to provide the details for stopovers on that leg of the journey.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited