Package com.google.maps.model
Class DirectionsStep
- java.lang.Object
-
- com.google.maps.model.DirectionsStep
-
- All Implemented Interfaces:
java.io.Serializable
public class DirectionsStep extends java.lang.Object implements java.io.Serializable
Each element in the steps of aDirectionsLeg
defines a single step of the calculated directions. A step is the most atomic unit of a direction's route, containing a single step describing a specific, single instruction on the journey. E.g. "Turn left at W. 4th St." The step not only describes the instruction but also contains distance and duration information relating to how this step relates to the following step. For example, a step denoted as "Merge onto I-80 West" may contain a duration of "37 miles" and "40 minutes," indicating that the next step is 37 miles/40 minutes from this step.When using the Directions API to search for transit directions, the steps array will include additional Transit Details in the form of a
transitDetails
array. If the directions include multiple modes of transportation, detailed directions will be provided for walking or driving steps in asteps
array. For example, a walking step will include directions from the start and end locations: "Walk to Innes Ave & Fitch St". That step will include detailed walking directions for that route in thesteps
array, such as: "Head north-west", "Turn left onto Arelious Walker", and "Turn left onto Innes Ave".- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Distance
distance
The distance covered by this step until the next step.Duration
duration
The typical time required to perform the step, until the next step.LatLng
endLocation
The location of the last point of this step.java.lang.String
htmlInstructions
Formatted instructions for this step, presented as an HTML text string.java.lang.String
maneuver
Deprecated.EncodedPolyline
polyline
The path of this step.LatLng
startLocation
The location of the starting point of this step.DirectionsStep[]
steps
Detailed directions for walking or driving steps in transit directions.TransitDetails
transitDetails
Transit-specific information.TravelMode
travelMode
The travel mode of this step.
-
Constructor Summary
Constructors Constructor Description DirectionsStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
-
-
-
Field Detail
-
htmlInstructions
public java.lang.String htmlInstructions
Formatted instructions for this step, presented as an HTML text string.
-
distance
public Distance distance
The distance covered by this step until the next step.
-
maneuver
@Deprecated public java.lang.String maneuver
Deprecated.The maneuver required to move ahead. E.g., turn-left. Please note, this field is undocumented, and thus should not be relied upon.
-
duration
public Duration duration
The typical time required to perform the step, until the next step.
-
startLocation
public LatLng startLocation
The location of the starting point of this step.
-
endLocation
public LatLng endLocation
The location of the last point of this step.
-
steps
public DirectionsStep[] steps
Detailed directions for walking or driving steps in transit directions. Substeps are only available when travelMode is set to "transit".
-
polyline
public EncodedPolyline polyline
The path of this step.
-
travelMode
public TravelMode travelMode
The travel mode of this step. See Travel Modes for more detail.
-
transitDetails
public TransitDetails transitDetails
Transit-specific information. This field is only returned when travel_mode is set to "transit". See Transit Details for more detail.
-
-