# Bing Map Rest Provider

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](https://learn.microsoft.com/en-us/previous-versions/bing/wpf-control/hh709042\(v=msdn.10\)).

> caution The Bing Maps REST Services is [deprecated](https://learn.microsoft.com/en-us/bingmaps/rest-services/). The BingRestMapProvider will be supported until 2026 Q2 inclusive. To avoid disruptions, you can use the [Azure Maps Services](https://learn.microsoft.com/en-us/azure/azure-maps/), which are supported by the RadMap control via the [AzureMapProvider](https://www.telerik.com/products/wpf/documentation/controls/radmap/features/providers/azuremapprovider).

> The RadMap BingRestMapProvider is based on the Bing Maps [Imagery API](https://msdn.microsoft.com/en-us/library/ff701721.aspx?f=255\&MSPPError=-2147217396).

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.

**Setting BingRestMapProvider in XAML**

```XAML
<telerik:RadMap>
    <telerik:RadMap.Provider>
        <telerik:BingRestMapProvider ApplicationId="Bing_Map_Key" Mode="Aerial" IsLabelVisible="True"/>
    </telerik:RadMap.Provider>
</telerik:RadMap>
```

**Defining BingRestMapProvider programmaticaly**

```C#
BingRestMapProvider bingMap = new BingRestMapProvider(MapMode.Aerial, true, "Bing_Map_Key");
this.radMap.Provider = bingMap;
```

```VB.NET
	Dim bingMap As New BingRestMapProvider(MapMode.Aerial, True, "Bing_Map_Key")
	Me.radMap.Provider = bingMap
```

> caption Aerial mode with labels

![RadMap BingRestMapProvider Aerial mode with labels](https://www.telerik.com/products/wpf/documentation/assets/11e920600bb9c08b6f9b67960a0a6712/radmap_features_rest_providers_01.png)

You can disable labels using the `IsLabelVisible` property. When you set it to *False* the labels disappear. The following snapshot of the Aerial mode for Bing Rest Map Provider when the labels are not visible:

> caption Aerial mode without labels

![RadMap Features Aerial mode without labels](https://www.telerik.com/products/wpf/documentation/assets/9a605bd301270d70ba263831c8a17340/radmap_features_rest_providers_02_nolabels.png)

## Attribution Copyright Label

When using the BingRestMapProvider, you have to display an attribution copyright label to the Bing Rest Maps services. To learn more about the accurate copyright label's content, please refer to this [article](https://www.microsoft.com/en-us/maps/bing-maps/product/print-rights).

> tip To learn how to customize the RadMap to allocate space for displaying an element containing a sample attribution copyright label, check this [article](https://www.telerik.com/products/wpf/documentation/knowledge-base/kb-map-copyright-label).

## Language

Bing Rest Service provides culture parameter in its url address. This parameter can be used to specify a culture for your request. To change the current culture of the labels shown on the BingRestMapProvider, the `Language` property of the RadMap control can be used.

> For a list of supported cultures, see [Supported Culture Codes](https://docs.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes?redirectedfrom=MSDN).

**Setting Language of RadMap in XAML**

```XAML
<telerik:RadMap Language="fr-FR" x:Name="radMap">
    <telerik:RadMap.Provider>
        <telerik:BingRestMapProvider ApplicationId="Bing_Map_Key" Mode="Aerial" IsLabelVisible="True"/>
    </telerik:RadMap.Provider>
</telerik:RadMap>
```

> caption BingRestMapProvider with French culture parameter

![RadMap BingRestMapProvider with French culture parameter](https://www.telerik.com/products/wpf/documentation/assets/9a7220372235d430d016836229b2788a/radmap_features_rest_providers_language_03.png)

## See Also

* [Providers Overview](https://www.telerik.com/products/wpf/documentation/controls/radmap/features/providers/providers)
* [ArcGIS Online Map Provider](https://www.telerik.com/products/wpf/documentation/controls/radmap/features/providers/arcgis)
