Table of Contents

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

Distance

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

Duration

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

Location

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

string

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

string

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

OverviewPolyline

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

Location

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

IEnumerable<Step>

TransitDetails

More information about the step. Only avaliable when TravelMode = Transit

[JsonPropertyName("transit_details")]
public TransitDetails? TransitDetails { get; set; }

Property Value

TransitDetails

TravelMode

Gets the mode of transportation used in this step

[JsonPropertyName("travel_mode")]
[JsonConverter(typeof(EnumMemberJsonConverter<TravelMode>))]
public TravelMode TravelMode { get; set; }

Property Value

TravelMode