MapRouteOptimization Enum

Definition

Specifies the optimizations applied to a route. This enumeration provides values for certain parameters of some overloads of the GetDrivingRouteAsync and GetDrivingRouteFromWaypointsAsync methods.

public enum class MapRouteOptimization
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class MapRouteOptimization
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum MapRouteOptimization
Public Enum MapRouteOptimization
Inheritance
MapRouteOptimization
Attributes

Windows requirements

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

Fields

Distance 1

Optimize the route by minimizing the distance.

Scenic 3

Optimize the route to include the most scenic roads.

Time 0

Optimize the route by minimizing the time.

TimeWithTraffic 2

Optimize the route by minimizing the time with traffic.

Tip

Traffic-based routing is not automatically updated. To capture changes in traffic conditions, repeat the query.

Remarks

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
1709 16299 Scenic

Applies to

See also