google-maps-documentation

DirectionsStep interface

google.maps.DirectionsStep interface

A single DirectionsStep in a DirectionsResult. Some fields may be undefined. Note that though this object is "JSON-like," it is not strictly JSON, as it directly includes LatLng objects.

Properties
distance
Type:  Distance
The distance covered by this step. This property may be undefined as the distance may be unknown.
duration
Type:  Duration
The typical time required to perform this step in seconds and in text form. This property may be undefined as the duration may be unknown.
end_location
Type:  LatLng
The ending location of this step.
instructions
Type:  string
Instructions for this step.
path
Type:  Array<LatLng>
A sequence of LatLngs describing the course of this step.
start_location
Type:  LatLng
The starting location of this step.
steps
Type:  Array<DirectionsStep>
Sub-steps of this step. Specified for non-transit sections of transit routes.
transit
Transit-specific details about this step. This property will be undefined unless the travel mode of this step is TRANSIT.
travel_mode
Type:  TravelMode
The mode of travel used in this step.