The RadMap control supports visualizing tile data using the Bind Maps Rest imagery service. In order to create an instance of the BingRestMapProvider you have to use the third overload of its constructor. 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 Accessing the Control Using a Bing Maps Key.
The RadMap BingRestMapProvdider is based on the Bing Maps Imagery API.
Here is a list of the key properties which are used by 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.
If the provider’s initialization fails, the BingRestMapProvider will raise its InitializationFaulted event. The event can be fired for example, when the internet connection is lost or when the service is unavailable. The event arguments are of type InitializationFaultEventArgs type. The arguments provides an Error property which contains the exception which is thrown while initialization.
Example 1: Setting BingRestMapProvider in XAML
<telerik:RadMap> <telerik:RadMap.Provider> <telerik:BingRestMapProvider ApplicationId="Bing_Map_Key" Mode="Aerial" IsLabelVisible="True"/> </telerik:RadMap.Provider> </telerik:RadMap>
Example 2: Defining BingRestMapProvider programmaticaly
BingRestMapProvider bingMap = new BingRestMapProvider( MapMode.Aerial, true, "Bing_Map_Key" ); this.radMap.Provider = bingMap;
Dim bingMap As New BingRestMapProvider(MapMode.Aerial, True, "Bing_Map_Key") Me.radMap.Provider = bingMap
You can the disable labels using the IsLabelVisible property. When you set it to False the labels disappear. Here is a snapshot of the Aerial mode for Bing Map Rest Provider when the labels are not visible: