Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    AzureTrafficIncidentOptions Class

    Contains parameters for traffic incident requests.

    Namespace: DevExpress.XtraMap

    Assembly: DevExpress.XtraMap.v25.1.dll

    NuGet Package: DevExpress.Win.Map

    #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