Show / Hide Table of Contents

Class RouteLeg

Contains a segment between non-via waypoints.

Inheritance
object
RouteLeg
Implements
IMessage<RouteLeg>
IEquatable<RouteLeg>
IDeepCloneable<RouteLeg>
IBufferMessage
IMessage
Inherited Members
object.GetHashCode()
object.GetType()
object.ToString()
Namespace: Google.Maps.Routing.V2
Assembly: Google.Maps.Routing.V2.dll
Syntax
public sealed class RouteLeg : IMessage<RouteLeg>, IEquatable<RouteLeg>, IDeepCloneable<RouteLeg>, IBufferMessage, IMessage

Constructors

RouteLeg()

Declaration
public RouteLeg()

RouteLeg(RouteLeg)

Declaration
public RouteLeg(RouteLeg other)
Parameters
Type Name Description
RouteLeg other

Properties

DistanceMeters

The travel distance of the route leg, in meters.

Declaration
public int DistanceMeters { get; set; }
Property Value
Type Description
int

Duration

The length of time needed to navigate the leg. If the route_preference is set to TRAFFIC_UNAWARE, then this value is the same as static_duration. If the route_preference is either TRAFFIC_AWARE or TRAFFIC_AWARE_OPTIMAL, then this value is calculated taking traffic conditions into account.

Declaration
public Duration Duration { get; set; }
Property Value
Type Description
Duration

EndLocation

The end location of this leg. This location might be different from the provided destination. For example, when the provided destination is not near a road, this is a point on the road.

Declaration
public Location EndLocation { get; set; }
Property Value
Type Description
Location

LocalizedValues

Text representations of properties of the RouteLeg.

Declaration
public RouteLeg.Types.RouteLegLocalizedValues LocalizedValues { get; set; }
Property Value
Type Description
RouteLeg.Types.RouteLegLocalizedValues

Polyline

The overall polyline for this leg that includes each step's polyline.

Declaration
public Polyline Polyline { get; set; }
Property Value
Type Description
Polyline

StartLocation

The start location of this leg. This location might be different from the provided origin. For example, when the provided origin is not near a road, this is a point on the road.

Declaration
public Location StartLocation { get; set; }
Property Value
Type Description
Location

StaticDuration

The duration of travel through the leg, calculated without taking traffic conditions into consideration.

Declaration
public Duration StaticDuration { get; set; }
Property Value
Type Description
Duration

Steps

An array of steps denoting segments within this leg. Each step represents one navigation instruction.

Declaration
public RepeatedField<RouteLegStep> Steps { get; }
Property Value
Type Description
RepeatedField<RouteLegStep>

StepsOverview

Overview information about the steps in this RouteLeg. This field is only populated for TRANSIT routes.

Declaration
public RouteLeg.Types.StepsOverview StepsOverview { get; set; }
Property Value
Type Description
RouteLeg.Types.StepsOverview

TravelAdvisory

Contains the additional information that the user should be informed about, such as possible traffic zone restrictions, on a route leg.

Declaration
public RouteLegTravelAdvisory TravelAdvisory { get; set; }
Property Value
Type Description
RouteLegTravelAdvisory
In this article
Back to top Generated by DocFX