Skip to main content
All docs
V24.2

AzureRouteIsochroneDataProvider.CalculateIsochroneByDistance(RouteWaypoint, Double, AzureRouteIsochroneOptions) Method

Calculates an isochrone based on travel distance.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

Declaration

public void CalculateIsochroneByDistance(
    RouteWaypoint waypoint,
    double maxDistanceMeters,
    AzureRouteIsochroneOptions options
)

Parameters

Name Type Description
waypoint RouteWaypoint

Origin point coordinates.

maxDistanceMeters Double

Maximum allowed travel distance. The default measurement unit is meter.

options AzureRouteIsochroneOptions

An AzureRouteIsochroneOptions object that defines isochrone calculation options passed to the Azure Maps service.

Remarks

When you call CalculateIsochroneByTime or CalculateIsochroneByDistance methods, use the AzureRouteIsochroneOptions parameter to specify route options.

The following settings are available:

AzureRouteIsochroneOptions.AvoidTypes
Excludes specified road or transportation types from the route.
AzureRouteIsochroneOptions.ExtendedRouteDefinitions
Specifies additional route calculation parameters (definitions).
AzureRouteIsochroneOptions.TravelMode
Specifies 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);
}
See Also