Class Step
- Namespace
- GoogleMapsApi.Entities.Directions.Response
- Assembly
- GoogleMapsApi.dll
Each element in the steps array 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.
public class Step
- Inheritance
-
Step
- Inherited Members
Properties
Distance
distance contains the distance covered by this step until the next step. (See the discussion of this field in Directions Legs above.) This field may be undefined if the distance is unknown.
[JsonPropertyName("distance")]
public Distance? Distance { get; set; }
Property Value
Duration
duration contains the typical time required to perform the step, until the next step (See the description in Directions Legs above.) This field may be undefined if the duration is unknown.
[JsonPropertyName("duration")]
public Duration? Duration { get; set; }
Property Value
EndLocation
end_location contains the location of the starting point of this step, as a single set of lat and lng fields.
[JsonPropertyName("end_location")]
public Location? EndLocation { get; set; }
Property Value
HtmlInstructions
html_instructions contains formatted instructions for this step, presented as an HTML text string.
[JsonPropertyName("html_instructions")]
public string? HtmlInstructions { get; set; }
Property Value
Maneuver
Gets the action to take for the current step (turn left, merge, straight, etc.) - Values in this list are subject to change. See documentation.
[JsonPropertyName("maneuver")]
public string? Maneuver { get; set; }
Property Value
PolyLine
Contains an object holding an array of encoded points that represent an approximate (smoothed) path of the resulting directions.
[JsonPropertyName("polyline")]
public OverviewPolyline? PolyLine { get; set; }
Property Value
StartLocation
start_location contains the location of the starting point of this step, as a single set of lat and lng fields.
[JsonPropertyName("start_location")]
public Location? StartLocation { get; set; }
Property Value
SubSteps
Contains detailed directions for walking or driving steps in transit directions. Substeps are only available when TravelMode is set to Transit.
- NOTE : Google documentations states that it should be 'sub_steps' but implemented as 'steps' so we use the actual implementation
[JsonPropertyName("steps")]
public IEnumerable<Step>? SubSteps { get; set; }
Property Value
TransitDetails
More information about the step. Only avaliable when TravelMode = Transit
[JsonPropertyName("transit_details")]
public TransitDetails? TransitDetails { get; set; }
Property Value
TravelMode
Gets the mode of transportation used in this step
[JsonPropertyName("travel_mode")]
[JsonConverter(typeof(EnumMemberJsonConverter<TravelMode>))]
public TravelMode TravelMode { get; set; }