Skip to main content
All docs
V24.2

AzureRouteIsochroneDataProvider Class

Allows you to use the Azure Maps service to calculate an isochrone and display it on the map.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

Declaration

public class AzureRouteIsochroneDataProvider :
    AzureMapDataProviderBase

Remarks

The AzureRouteIsochroneDataProvider implements the Azure Maps service. Assign such an object to the InformationLayer.DataProvider property to enable the service and display an isochrone (an area around an origin point). You can calculate the area based on travel time or distance.

Azure Maps services support JSON response formats. Install the System.Text.Json package in projects that target .NET Framework to parse the Azure server response and display information on a DevExpress Map control.

Call one of the AzureRouteIsochroneDataProvider.CalculateIsochroneByDistance method overloads to calculate an isochrone based on travel distance.

Call one of the AzureRouteIsochroneDataProvider.CalculateIsochroneByTime method overloads to calculate an isochrone based on travel time.

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);
}

Implements

See Also