Edit this page

Bing Map Provider

The BingMapProvider is marked as obsolete in R1 2017 and will be removed in R2 2017. It uses Bing SOAP Imagery service that will be stopped in June 2017. Please use BingRestMapProvider instead.

Properties

The RadMap supports using of the Bing Maps imagery services for displaying the map. There are 2 types of providers which are used in Bing Maps. The tile images of Bing Maps can be used via the BingMapProvider (SOAP imagery service) or BingRestMapProvider (RESTful imagery service) class. In order to create an instance of the BingMapProvider you have to use the third overload of its constructor. In this way you can easily pass the required parameters - map mode, labels visibility and a Bing Maps Key. The most important of them is the Bing Maps Key parameter. Without supplying a valid key you will not be able to visualize the map inside the RadMap control. In order to learn how to obtain one, please read this article.

Here is a list of the most important properties which are used by BingMapProvider and BingRestMapProvider:

  • ApplicationId - gets or sets Bing Maps Key.

  • IsLabelVisible - gets or sets value which indicates whether labels should be visible on the map.

  • Mode - gets or sets the mode defining how the map looks. You can choose between Road, Aerial and Birdseye options.

  • UseSession - gets or sets value which indicates whether Bing session should be used. Make sense during provider initialization only.

The BingMapProvider and BingRestMapProvider can raise the InitializationFaulted event. It occurs when initialization of the Bing Maps service has faulted. It can be raised for example when the internet connection is lost or when the service is unavailable. This event contains a parameter of InitializationFaultEventArgs type. This parameter provides the Error property which contains the exception which is thrown while initialization.

Here is an example of a BingMapProvider definition:

XAML

<telerik:RadMap x:Name="radMap" ZoomLevel="1">
    <telerik:RadMap.Provider>
        <telerik:BingMapProvider ApplicationId="Bing_Map_Key" Mode="Aerial" IsLabelVisible="True"/>
    </telerik:RadMap.Provider>
</telerik:RadMap>

C#

BingMapProvider bingMap = new BingMapProvider( MapMode.Aerial, true, "key" );
this.radMap.Provider = bingMap;

VB.NET

Dim bingMap As New BingMapProvider(MapMode.Aerial, True, "key")
Me.radMap.Provider = bingMap

Here is a snapshot of the map that appears:
Rad Map Features Providers 01

You can disable labels using the IsLabelVisible property. When you set it to False value then the labels disappear. Here is a snapshot of the Aerial mode for Bing Map Provider when the labels are invisible:

Rad Map Features Providers 01 nolabels

Road Mode

The Road mode of Bing Maps ignores the IsLabelVisible property. For this mode the labels are displayed always.

Here is an example of the Road Mode definition:

XAML

<telerik:RadMap x:Name="radMap" ZoomLevel="1">
    <telerik:RadMap.Provider>
        <telerik:BingMapProvider ApplicationId="Bing_Map_Key" Mode="Road" IsLabelVisible="True"/>
    </telerik:RadMap.Provider>
</telerik:RadMap>

C#

BingMapProvider bingMap = new BingMapProvider( MapMode.Road, true, "key" );
this.radMap.Provider = bingMap;

VB.NET

Dim bingMap As New BingMapProvider(MapMode.Road, True, "key")
Me.radMap.Provider = bingMap

Here is a snapshot of the Road mode for Bing Map Provider:

Rad Map Features Providers Bing Map Road

Birdseye Mode

The Bing Map Provider also supports the Birdseye mode. This mode can be used for high resolution levels only (zoom level 19-20)

The Birdseye mode of Bing Maps does not provide the tile images for all regions around the world. Some regions have not images for Birdseye mode.

Here is an example of the Birdseye Mode definition:

XAML

<telerik:RadMap x:Name="radMap" ZoomLevel="1">
    <telerik:RadMap.Provider>
        <telerik:BingMapProvider ApplicationId="Bing_Map_Key" Mode="Birdseye" IsLabelVisible="True"/>
    </telerik:RadMap.Provider>
</telerik:RadMap>

C#

BingMapProvider bingMap = new BingMapProvider( MapMode.Birdseye, true, "key" );
this.radMap.Provider = bingMap;

VB.NET

Dim bingMap As New BingMapProvider(MapMode.Birdseye, True, "key")
Me.radMap.Provider = bingMap

Here is a snapshot of the Birdseye mode for Bing Map Provider:

Rad Map Features Providers Bing Map Birdseye

See Also