Map​Route​Leg Map​Route​Leg Map​Route​Leg Class

Definition

Represents the set of actions (maneuvers) required to travel between two waypoints along a route.

public sealed class MapRouteLeg : IMapRouteLeg, IMapRouteLeg2public sealed class MapRouteLeg : IMapRouteLeg, IMapRouteLeg2Public NotInheritable Class MapRouteLeg Implements IMapRouteLeg, IMapRouteLeg2
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

A collection of MapRouteLeg objects is returned through the Legs property of a MapRoute object. A MapRoute object is returned through the Route property of the MapRouteFinderResult when you call the methods of the MapRouteFinder class.

Your Universal Windows app must be authenticated before it can use the MapControl and map services in the Windows.Services.Maps namespace. To authenticate your app, you must specify a maps authentication key.

See Request a maps authentication key.

Properties

BoundingBox BoundingBox BoundingBox

Gets the bounding box that contains the route leg.

public GeoboundingBox BoundingBox { get; }public GeoboundingBox BoundingBox { get; }Public ReadOnly Property BoundingBox As GeoboundingBox
Value
GeoboundingBox GeoboundingBox GeoboundingBox

The bounding box that contains the route leg.

Attributes

Remarks

If you want to display this bounding box in the MapControl, use one of the overloads of the TrySetViewAsync method that accepts a GeoboundingBox as input.

See Also

DurationWithoutTraffic DurationWithoutTraffic DurationWithoutTraffic

Gets the estimated time required to traverse the route without traffic.

public TimeSpan DurationWithoutTraffic { get; }public TimeSpan DurationWithoutTraffic { get; }Public ReadOnly Property DurationWithoutTraffic As TimeSpan
Value
TimeSpan TimeSpan TimeSpan

The estimated time required to traverse the route without traffic.

Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

EstimatedDuration EstimatedDuration EstimatedDuration

Gets the estimated time required to traverse the route leg.

public TimeSpan EstimatedDuration { get; }public TimeSpan EstimatedDuration { get; }Public ReadOnly Property EstimatedDuration As TimeSpan
Value
TimeSpan TimeSpan TimeSpan

The estimated time required to traverse the route leg.

Attributes
See Also

LengthInMeters LengthInMeters LengthInMeters

Gets the length of the route leg in meters.

public double LengthInMeters { get; }public double LengthInMeters { get; }Public ReadOnly Property LengthInMeters As double
Value
double double double

The length of the route leg in meters.

Attributes
See Also

Maneuvers Maneuvers Maneuvers

Gets the list of maneuvers associated with the route leg.

public IVectorView<MapRouteManeuver> Maneuvers { get; }public IVectorView<MapRouteManeuver> Maneuvers { get; }Public ReadOnly Property Maneuvers As IVectorView<MapRouteManeuver>
Value

The list of maneuvers associated with the route leg. This property returns a collection of MapRouteManeuver objects.

Attributes
See Also

Path Path Path

Gets the path of the route leg.

public Geopath Path { get; }public Geopath Path { get; }Public ReadOnly Property Path As Geopath
Value
Geopath Geopath Geopath

The path of the route leg.

Attributes
See Also

TrafficCongestion TrafficCongestion TrafficCongestion

Gets the level of traffic congestion along a map route leg.

public TrafficCongestion TrafficCongestion { get; }public TrafficCongestion TrafficCongestion { get; }Public ReadOnly Property TrafficCongestion As TrafficCongestion
Value
TrafficCongestion TrafficCongestion TrafficCongestion

The level of traffic congestion along a map route leg.

Attributes
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

See Also