Share via


MapRouteLeg Class

Definition

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

public ref class MapRouteLeg sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MapRouteLeg final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MapRouteLeg
Public NotInheritable Class MapRouteLeg
Inheritance
Object Platform::Object IInspectable MapRouteLeg
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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.

Important

Bing Maps for Enterprise service retirement

The UWP MapControl and map services from the Windows.Services.Maps namespaces rely on Bing Maps. Bing Maps for Enterprise is deprecated and will be retired, at which point the MapControl and services will no longer receive data.

For more information, see the Bing Maps Developer Center and Bing Maps documentation.

Your 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.

Version history

Windows version SDK version Value added
1703 15063 DurationWithoutTraffic
1703 15063 TrafficCongestion

Properties

BoundingBox

Gets the bounding box that contains the route leg.

DurationWithoutTraffic

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

EstimatedDuration

Gets the estimated time required to traverse the route leg.

LengthInMeters

Gets the length of the route leg in meters.

Maneuvers

Gets the list of maneuvers associated with the route leg.

Path

Gets the path of the route leg.

TrafficCongestion

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

Applies to

See also