Skip to main content
All docs
V24.2

AzureTrafficIncidentOptions Class

Contains parameters for traffic incident requests.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

Declaration

public class AzureTrafficIncidentOptions

Remarks

Call the provider’s RequestTrafficIncidents method to receive a list of incidents. The AzureRouteOptions parameter allows you to specify traffic incident options.

The following code displays traffic incidents that occurred in the specified area:

using DevExpress.XtraMap;
// ...
const string key = "your key";
AzureTrafficIncidentDataProvider trafficIncidentProvider;
// ...
public Form1() {
    InitializeComponent();
    trafficIncidentProvider = new AzureTrafficIncidentDataProvider {
        AzureKey = key 
    };
    imageLayer2.DataProvider = new AzureMapDataProvider() {
        AzureKey = key,
        Tileset = AzureTileset.BaseHybridRoad
    };
    imageLayer1.DataProvider = new AzureMapDataProvider() {
        AzureKey = key,
        Tileset = AzureTileset.Imagery,
    };
    informationLayer1.DataProvider = trafficIncidentProvider;  
    trafficIncidentProvider.RequestTrafficIncidents(new SearchBoundingBox(-115.338457, 36.268745, 
      -114.988268, 36.1010376), 18, -1,
      new AzureTrafficIncidentOptions {
          OriginalPosition = false,
          IncidentGeometryType = AzureTrafficIncidentGeometryType.Shifted
      });
}

Inheritance

Object
AzureTrafficIncidentOptions
See Also