windowsforms-devexpress-dot-xtramap-59d9da1d.md
Contains isochrone calculation options passed to the Azure Maps service.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public class AzureRouteIsochroneOptions
Public Class AzureRouteIsochroneOptions
When you call CalculateIsochroneByTime or CalculateIsochroneByDistance methods, use the AzureRouteIsochroneOptions parameter to specify route options.
The following settings are available:
AzureRouteIsochroneOptions.AvoidTypesExcludes specified road or transportation types from the route.AzureRouteIsochroneOptions.ExtendedRouteDefinitionsSpecifies additional route calculation parameters (definitions).AzureRouteIsochroneOptions.TravelModeSpecifies the transportation / commute mode.
The following example calculates and plots an isochrone. The code sets the origin point and travel distance limit (10 km).
using DevExpress.XtraMap;
// ...
AzureRouteIsochroneDataProvider azureRoute;
const string azureKey = "your key";
// ...
public Form1() {
InitializeComponent();
imageLayer1.DataProvider = new AzureMapDataProvider() {
AzureKey = azureKey,
Tileset = AzureTileset.Imagery,
};
imageLayer2.DataProvider = new AzureMapDataProvider() {
AzureKey = azureKey,
Tileset = AzureTileset.BaseHybridRoad,
};
azureRoute = new AzureRouteIsochroneDataProvider {
AzureKey = azureKey,
};
informationLayer1.DataProvider = azureRoute;
GeoPoint origin = new GeoPoint(36.1532403246368, -86.7701703811725);
azureRoute.CalculateIsochroneByDistance(new RouteWaypoint("", origin), 10000,
new AzureRouteIsochroneOptions { AvoidTypes = AzureRouteAvoidType.Motorways });
mapControl1.SetCenterPoint(origin, false);
mapControl1.Zoom(11);
}
Imports DevExpress.XtraMap
' ...
Private azureRoute As AzureRouteIsochroneDataProvider
Private Const azureKey As String = "your key"
' ...
Public Sub New()
InitializeComponent()
imageLayer1.DataProvider = New AzureMapDataProvider() With {
.AzureKey = azureKey,
.Tileset = AzureTileset.Imagery
}
imageLayer2.DataProvider = New AzureMapDataProvider() With {
.AzureKey = azureKey,
.Tileset = AzureTileset.BaseHybridRoad
}
azureRoute = New AzureRouteIsochroneDataProvider With {.AzureKey = azureKey}
informationLayer1.DataProvider = azureRoute
Dim origin As New GeoPoint(36.1532403246368, -86.7701703811725)
azureRoute.CalculateIsochroneByDistance(New RouteWaypoint("", origin), 10000, New AzureRouteIsochroneOptions With {.AvoidTypes = AzureRouteAvoidType.Motorways})
mapControl1.SetCenterPoint(origin, False)
mapControl1.Zoom(11)
End Sub
Object AzureRouteIsochroneOptions
See Also