New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Implementing Azure Maps Support in RadMap for ASP.NET AJAX
Environment
Product | RadMap for ASP.NET AJAX |
Version | All |
Description
I want to use Azure Maps with RadMap for ASP.NET AJAX instead of Bing Maps. I need to know if RadMap supports Azure Maps and how to configure it.
This knowledge base article also answers the following questions:
- How to use Azure Maps with RadMap for ASP.NET AJAX?
- Can RadMap work with Azure's PNG tile API?
- How to configure TileLayers in RadMap for Azure Maps?
Solution
To use Azure Maps with RadMap for ASP.NET AJAX, utilize Azure's PNG tile API and configure the UrlTemplate
property of the TileLayers. Follow these steps:
- Ensure you have an Azure Maps account and an authentication key. Refer to Azure Maps Authentication for details.
- Specify the API version in the URL for the
UrlTemplate
property. - Use the following code snippet to set up Azure Maps in RadMap:
ASP.NET
<telerik:RadMap runat="server" ID="RadMap1">
<LayersCollection>
<telerik:MapLayer Type="Tile" UrlTemplate="https://atlas.microsoft.com/map/tile?subscription-key=[KEY]&api-version=2.0&tilesetId=microsoft.base.road&x=#=x#&y=#=y#&zoom=#=zoom#&tileSize=256" />
</LayersCollection>
</telerik:RadMap>
- Replace
[KEY]
with your Azure Maps subscription key.
By implementing this configuration, Azure Maps will function as a map layer in RadMap.