MapRouteLeg MapRouteLeg MapRouteLeg MapRouteLeg 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// This API is not available in Javascript.
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 BoundingBox

Gets the bounding box that contains the route leg.

public : GeoboundingBox BoundingBox { get; }public GeoboundingBox BoundingBox { get; }Public ReadOnly Property BoundingBox As GeoboundingBox// This API is not available in Javascript.
Value
GeoboundingBox GeoboundingBox GeoboundingBox GeoboundingBox

The bounding box that contains the route leg.

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 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// This API is not available in Javascript.
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The estimated time required to traverse the route without traffic.

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 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// This API is not available in Javascript.
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The estimated time required to traverse the route leg.

See Also

LengthInMeters 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// This API is not available in Javascript.
Value
double double double double

The length of the route leg in meters.

See Also

Maneuvers Maneuvers Maneuvers Maneuvers

Gets the list of maneuvers associated with the route leg.

public : IVectorView<MapRouteManeuver> Maneuvers { get; }public IReadOnlyList<MapRouteManeuver> Maneuvers { get; }Public ReadOnly Property Maneuvers As IReadOnlyList<MapRouteManeuver>// This API is not available in Javascript.
Value
IVectorView<MapRouteManeuver> IReadOnlyList<MapRouteManeuver> IReadOnlyList<MapRouteManeuver> IReadOnlyList<MapRouteManeuver>

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

See Also

Path Path Path Path

Gets the path of the route leg.

public : Geopath Path { get; }public Geopath Path { get; }Public ReadOnly Property Path As Geopath// This API is not available in Javascript.
Value
Geopath Geopath Geopath Geopath

The path of the route leg.

See Also

TrafficCongestion 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// This API is not available in Javascript.
Value
TrafficCongestion TrafficCongestion TrafficCongestion TrafficCongestion

The level of traffic congestion along a map route leg.

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

See Also