windowsforms-devexpress-dot-xtramap-4dbe1e5d.md
This class is obsolete. Microsoft deprecated Bing Maps on June 30th, 2025. For alternative providers, see https://www.devexpress.com/bing-maps-winforms
Allows you to receive information about traffic incidents within a specified area from the Bing Maps service and display incident icons on the map.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
[Obsolete("This class is obsolete. Microsoft deprecated Bing Maps on June 30th, 2025. For alternative providers, see https://www.devexpress.com/bing-maps-winforms")]
[PreferableMember("BingTrafficIncidentDataProvider", "", "")]
public class BingTrafficIncidentDataProvider :
BingMapDataProviderBase
<Obsolete("This class is obsolete. Microsoft deprecated Bing Maps on June 30th, 2025. For alternative providers, see https://www.devexpress.com/bing-maps-winforms")>
<PreferableMember("BingTrafficIncidentDataProvider", "", "")>
Public Class BingTrafficIncidentDataProvider
Inherits BingMapDataProviderBase
Follow the steps below to create a map with traffic incidents:
Create an InformationLayer object and add it to the MapControl.Layers collection.
Create a BingTrafficIncidentDataProvider object and specify its BingKey property. Assign the object to the layer’s DataProvider property.
Call the provider’s RequestTrafficIncidents method to receive a list of incidents.
To include traffic location codes in the method’s result, enable the BingTrafficIncidentDataProvider.Options.IncludeLocationCodes property.
After you obtain a list of incidents, the provider raises the TrafficIncidentCalculated event. You can handle the event to access the collection of received incidents or add custom logic.
Object InformationDataProviderBase WebInformationDataProvider BingMapDataProviderBase BingTrafficIncidentDataProvider
See Also