New to Telerik UI for WinFormsStart a free 30-day trial

BingRestMapProvider

Updated over 6 months ago

Please note that Bing Maps will be deprecated effective June 30, 2025. As an alternative, users can refer to the SDK example available in our GitHub repository, which demonstrates how to create a custom provider using the Azure Maps API. A valid Azure Maps subscription key is required to use this functionality.

RadMap can visualize tile data from the Bing Maps REST service. You can enable tile caching to a local folder by setting a new LocalFileCacheProvider to the BingRestMapProvider.CacheProvider property.

Figure 1: BingRestMapProvider

WinForms RadMap BingRestMapProvider

You must provide a Bing Maps Key to the provider for it to work. To get your free Bing Maps Key, please refer to the following link: Getting a Bing Maps Key.

Only billable transactions count towards the free-use limits for Basic keys, and Enterprise keys are only charged for billable transactions. Non-billable transactions do not incur charges and do not count towards free-use limits. You can find additional information in the following link: Billable versus non-billable transactions.

BingRestMapProvider internally loads tile data from the Bing Maps REST service which requires TLS 1.2 coming automatically with .NET Framework 4.7. For older .NET Frameworks, or because of some other Windows settings, it may be necessary to explicitly choose TLS 1.2 for your application by setting the System.Net.ServicePointManager.SecurityProtocol property to SecurityProtocolType.Tls12. More information is available here: Transport Layer Security (TLS) best practices with the .NET Framework.

Using BingRestMapProvider

C#

string cacheFolder = @"..\..\cache";
BingRestMapProvider bingProvider = new Telerik.WinControls.UI.BingRestMapProvider();
bingProvider.UseSession = true;
bingProvider.BingKey = bingKey;
LocalFileCacheProvider cache = new LocalFileCacheProvider(cacheFolder);
bingProvider.CacheProvider = cache;
this.radMap1.Providers.Add(bingProvider);

If you use RadMap with .Net Framework 2.0 and you don't have an installation of the Telerik UI for WinForms suite on the current machine, it is necessary to add a reference to the Newtonsoft.Json assembly which can be found in the \Bin folder of the Telerik_UI_For_WinForms_[version]_Dev_dlls.zip. If you are using .Net Framework 4.0 this is not required.

Properties

PropertyDescription
BingKeyGets or sets the Bing key.
UseSessionGets or sets a value indicating whether to use session key.
SessionIdGets the session identifier.
ImagerySetGets or sets the imagery set. The possible values are: Aerial, AerialWithLabels, AerialWithLabelsOnDemand,Road, RoadOnDemand, CanvasDark, CanvasLight, CanvasGray, OrdnanceSurvey. WinForms RadMap ImagerySet
InitializingGets or sets a value indicating whether this BingRestMapProvider is currently in the initialization process.
InitializedGets or sets a value indicating whether this BingRestMapProvider is initialized.
MaxZoomLevelGets or sets the maximum zoom level.
MinZoomLevelGets or sets the minimum zoom level.
TileSizeGets the tile size.
CacheProviderGets or sets the provider used for data caching.
EnableCachingGets or set a value whether the caching is enabled.
TileDownloaderGets or sets the tile downloader.

The ImagerySet.OrdnanceSurvey is only visible in the Great Britain area and in between zoom levels of 10 and 17.

Methods

MethodDescription
InitializeInitializes this provider.
GetTileGets the tile uri.
GetTileImageGets the tile image.
CalculateRouteAsyncCalculates the route asynchronously.
SearchAsyncPerforms search request asynchronously.
CalculateElevationAsyncCalculates the elevation asynchronously.
GetSupportedViewsGets the supported views. BingRestMapProvider supports Aerial and Road MapViewInfo.
SetViewSets the view in the BingRestMapProvider.

Events

EventDescription
InitializationCompleteFires when the initialization is completed.
InitializationErrorFires when an error during the initialization occurs.
ProviderUpdatedFires when the provider has been updated, e.g. when a tile is downloaded.
CalculateRouteCompletedFires when the route calculation is completed.
CalculateRouteErrorFires when an error occurs during route calculating.
SearchCompletedFires when the search request has completed.
SearchErrorFires when an error
CalculateElevationCompletedFires when the elevation calculations is completed.
CalculateElevationErrorFire when an error occurs duriong elevation calculating.

See Also

In this article
See Also
Not finding the help you need?
Contact Support