wpf-devexpress-dot-xpf-dot-map-dot-azurerouteoptions-8ed262ac.md
Specifies additional route definitions.
Namespace : DevExpress.Xpf.Map
Assembly : DevExpress.Xpf.Map.v25.2.dll
NuGet Package : DevExpress.Wpf.Map
public Dictionary<string, string> CustomParameters { get; set; }
Public Property CustomParameters As Dictionary(Of String, String)
| Type | Description |
|---|---|
| Dictionary<String, String> |
The dictionary that stores additional route definitions.
|
Use this property to add route instructions and thus adjust route calculation.
The following code snippet allows the Azure Route service to rearrange waypoints passed to the AzureRouteDataProvider.CalculateRoute method to create an optimized route:
using DevExpress.Xpf.Map;
// ...
const string key = "your key";
// ...
AzureRouteDataProvider routeProvider = new AzureRouteDataProvider();
routeProvider.AzureKey = key;
List<RouteWaypoint> waypoints = new List<RouteWaypoint>();
waypoints.Add(new RouteWaypoint("NY", new GeoPoint(41.145556, -73.995)));
waypoints.Add(new RouteWaypoint("Oklahoma", new GeoPoint(36.131389, -95.937222)));
waypoints.Add(new RouteWaypoint("Las Vegas", new GeoPoint(36.175, -115.136389)));
// Call the AzureRouteDataProvider.CalculateRoute method.
routeProvider.CalculateRoute(waypoints, new AzureRouteOptions() {
TravelMode = AzureTravelMode.Car,
AvoidTypes = AzureRouteAvoidType.None,
CustomParameters = new Dictionary<string, string>() { { "computeBestOrder", "true" } }
});
See Also