Jaa


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

Name Value Description
Time 0

Optimize the route by minimizing the time.

Distance 1

Optimize the route by minimizing the distance.

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.

Scenic 3

Optimize the route to include the most scenic roads.

Remarks

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

Applies to

See also