Table of Contents

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

string

DurationSeconds

Duration parsed to seconds.

[JsonIgnore]
public double? DurationSeconds { get; }

Property Value

double?

EndLocation

End location of the leg (waypoint snapped to road).

[JsonPropertyName("endLocation")]
public LegLocation? EndLocation { get; set; }

Property Value

LegLocation

Polyline

Polyline of this leg.

[JsonPropertyName("polyline")]
public Polyline? Polyline { get; set; }

Property Value

Polyline

StartLocation

Start location of the leg (waypoint snapped to road).

[JsonPropertyName("startLocation")]
public LegLocation? StartLocation { get; set; }

Property Value

LegLocation

StaticDuration

Static (traffic-free) travel time for this leg as a protobuf-duration string.

[JsonPropertyName("staticDuration")]
public string? StaticDuration { get; set; }

Property Value

string

StaticDurationSeconds

StaticDuration parsed to seconds.

[JsonIgnore]
public double? StaticDurationSeconds { get; }

Property Value

double?

Steps

Steps that make up this leg.

[JsonPropertyName("steps")]
public List<RouteLegStep>? Steps { get; set; }

Property Value

List<RouteLegStep>

TravelAdvisory

Travel-advisory metadata for the leg.

[JsonPropertyName("travelAdvisory")]
public RouteLegTravelAdvisory? TravelAdvisory { get; set; }

Property Value

RouteLegTravelAdvisory