MapRoute MapRoute MapRoute MapRoute Class

Definition

Represents a path to be traveled between two or more waypoints.

public : sealed class MapRoute
struct winrt::Windows::Services::Maps::MapRoute
public sealed class MapRoute
Public NotInheritable Class MapRoute
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

A MapRoute object is returned through the Route property of the MapRouteFinderResult when you call the methods of the MapRouteFinder class.

To display a MapRoute on a MapControl, construct a MapRouteView with the MapRoute and add the MapRouteView to the Routes collection of the MapControl.

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.

Version history

Windows version SDK version Value added
1703 15063 DurationWithoutTraffic
1703 15063 TrafficCongestion
1709 16299 IsScenic

Properties

BoundingBox BoundingBox BoundingBox BoundingBox

Gets the bounding box that contains the route.

DurationWithoutTraffic DurationWithoutTraffic DurationWithoutTraffic DurationWithoutTraffic

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

EstimatedDuration EstimatedDuration EstimatedDuration EstimatedDuration

Gets the estimated time required to traverse the route.

HasBlockedRoads HasBlockedRoads HasBlockedRoads HasBlockedRoads

Gets a value that indicates the route has been modified from the "best" route to avoid blocked roads.

IsScenic IsScenic IsScenic IsScenic

Gets a value that indicates whether the MapRoute is based on scenic roads.

IsTrafficBased IsTrafficBased IsTrafficBased IsTrafficBased

Gets a value indicating whether the MapRoute is based on traffic.

Legs Legs Legs Legs

Gets the list of legs associated with the route.

LengthInMeters LengthInMeters LengthInMeters LengthInMeters

Gets the length of the route in meters.

Path Path Path Path

Gets the path of the route.

TrafficCongestion TrafficCongestion TrafficCongestion TrafficCongestion

Gets the level of traffic congestion along a map route.

ViolatedRestrictions ViolatedRestrictions ViolatedRestrictions ViolatedRestrictions

Gets a value that indicates if any restrictions have been violated by the route.

See also