Class RouteLeg
- Namespace
- GoogleMapsApi.Entities.Routes.Response
- Assembly
- GoogleMapsApi.dll
A single leg of a Route (between two waypoints).
public sealed class RouteLeg
- Inheritance
-
RouteLeg
- Inherited Members
Properties
DistanceMeters
Distance covered by this leg in meters.
[JsonPropertyName("distanceMeters")]
public int? DistanceMeters { get; set; }
Property Value
- int?
Duration
Travel time for this leg as a protobuf-duration string (e.g. "123s").
[JsonPropertyName("duration")]
public string? Duration { get; set; }
Property Value
DurationSeconds
Duration parsed to seconds.
[JsonIgnore]
public double? DurationSeconds { get; }
Property Value
EndLocation
End location of the leg (waypoint snapped to road).
[JsonPropertyName("endLocation")]
public LegLocation? EndLocation { get; set; }
Property Value
Polyline
Polyline of this leg.
[JsonPropertyName("polyline")]
public Polyline? Polyline { get; set; }
Property Value
StartLocation
Start location of the leg (waypoint snapped to road).
[JsonPropertyName("startLocation")]
public LegLocation? StartLocation { get; set; }
Property Value
StaticDuration
Static (traffic-free) travel time for this leg as a protobuf-duration string.
[JsonPropertyName("staticDuration")]
public string? StaticDuration { get; set; }
Property Value
StaticDurationSeconds
StaticDuration parsed to seconds.
[JsonIgnore]
public double? StaticDurationSeconds { get; }
Property Value
Steps
Steps that make up this leg.
[JsonPropertyName("steps")]
public List<RouteLegStep>? Steps { get; set; }
Property Value
TravelAdvisory
Travel-advisory metadata for the leg.
[JsonPropertyName("travelAdvisory")]
public RouteLegTravelAdvisory? TravelAdvisory { get; set; }