# Azure Map Provider

The `RadMap` control supports visualizing tile data using the [Azure Maps services](https://azure.microsoft.com/en-us/products/azure-maps/). This is done via the `AzureMapProvider` class, which derives from the [`VectorTileMapProvider`](https://www.telerik.com/winui/documentation/controls/radmap/features/providers/vectortilemapprovider) base class.

The provider supports both the raster and the vector based tile sets of the Azure Maps services. The vector tiles are rendered on the client according to a style, which you can customize as described in the [Vector Tile Map Provider](https://www.telerik.com/winui/documentation/controls/radmap/features/providers/vectortilemapprovider) article.

## Setting the AzureMapProvider

To use this provider, create a new `AzureMapProvider` instance and set it to the `Provider` property of the `RadMap` control. After that, you will need to set the subscription key of the user's Azure account to the `SubscriptionKey` property of the `AzureMapProvider` instance. To obtain a key, you can review the [Manage authentication in Azure Maps](https://learn.microsoft.com/en-gb/azure/azure-maps/how-to-manage-authentication#view-authentication-details/) article.

> You can access the RadMap providers through an alias pointing to the Telerik.UI.Xaml.Controls.DataVisualization.Map namespace:  xmlns:telerikMap="using:Telerik.UI.Xaml.Controls.DataVisualization.Map"

#### **Adding the AzureMapProvider to the RadMap control**

```XAML
<dataVisualization:RadMap x:Name="radMap">
	<dataVisualization:RadMap.Provider>
		<telerikMap:AzureMapProvider SubscriptionKey="Azure_Maps_Subscription_Key"/>
	</dataVisualization:RadMap.Provider>
</dataVisualization:RadMap>
```

#### **Setting the AzureMapProvider in code**

```C#
AzureMapProvider provider = new AzureMapProvider();
provider.SubscriptionKey = "Azure_Maps_Subscription_Key";
this.radMap.Provider = provider;
```

## Specifying the TileSet

The Azure Maps services provide a set of different map layers ([tilesets](https://learn.microsoft.com/en-us/rest/api/maps/render-v2/get-map-tileset?tabs=HTTP#tilesetid)). The `AzureMapProvider` class allows you to specify the tileset to be displayed by setting the `TileSet` property.

#### **Specifying the tileset**

```XAML
<dataVisualization:RadMap x:Name="radMap">
	<dataVisualization:RadMap.Provider>
		<telerikMap:AzureMapProvider SubscriptionKey="Azure_Maps_Subscription_Key"
									 TileSet="DarkGrey"/>
	</dataVisualization:RadMap.Provider>
</dataVisualization:RadMap>
```

## Attribution Copyright Label

When using the `AzureMapProvider`, you have to display an attribution copyright label to the Azure Maps services. To learn more about the accurate copyright label's content, please refer to this [article](https://learn.microsoft.com/en-us/azure/azure-maps/how-to-show-attribution).

## Language

The Azure Maps services provide a culture parameter in its URL address and the `AzureMapProvider` allows you to utilize it. To do so, set the `Language` property to the desired culture string.

> tip Check the [Localization support in Azure Maps](https://learn.microsoft.com/en-us/azure/azure-maps/supported-languages) article for the supported languages of the Azure Maps services.

#### **Setting the Language property of the AzureMapProvider**

```XAML
<dataVisualization:RadMap x:Name="radMap">
	<dataVisualization:RadMap.Provider>
		<telerikMap:AzureMapProvider SubscriptionKey="Azure_Maps_Subscription_Key" Language="bg-BG"/>
	</dataVisualization:RadMap.Provider>
</dataVisualization:RadMap>
```

## APIVersion

The `AzureMapProvider` provides the functionality to specify the [Render](https://learn.microsoft.com/en-us/rest/api/maps/render?view=rest-maps-2025-01-01) REST API version of the Azure Maps services. This is done via the `APIVersion` property of the provider. The latest version of the Render REST API is **2024-04-01** and the `AzureMapProvider` uses it by default.

#### **Setting a previous version of the Render REST API version**

```XAML
<dataVisualization:RadMap x:Name="radMap">
	<dataVisualization:RadMap.Provider>
		<telerikMap:AzureMapProvider SubscriptionKey="Azure_Maps_Subscription_Key" APIVersion="2022-08-01"/>
	</dataVisualization:RadMap.Provider>
</dataVisualization:RadMap>
```

## See Also

* [Providers Overview](https://www.telerik.com/winui/documentation/controls/radmap/features/providers/providers)
* [Vector Tile Map Provider](https://www.telerik.com/winui/documentation/controls/radmap/features/providers/vectortilemapprovider)
