How to Visualize the Azure Maps in the .NET MAUI Maps (SfMaps)
In the Syncfusion® .NET MAUI Maps control, you can visualize the Azure Maps by providing its URL to the MapTileLayer’s UrlTemplate property.
To add Azure Maps, add the SfMaps control in your layout and the MapTileLayer to the SfMaps‘s Layer, as shown in the following code sample.
XAML:
<map:SfMaps>
<map:SfMaps.Layer>
<map:MapTileLayer x:Name="layer" />
</map:SfMaps.Layer>
</map:SfMaps>
Set the Azure Maps tile service URL to the UrlTemplate property of the MapTileLayer, as shown in the following code sample.
C#:
this.layer.UrlTemplate = "https://atlas.microsoft.com/map/imagery/png?subscription-key=Your-Key&api-version=1.0&style=satellite&zoom={z}&x={x}&y={y}";
Note: We recommend checking the licensing terms and conditions before using Azure Maps.
To request tiles from Azure, you need an API key. Follow the steps in this link to create the key and replace ‘Your-Key’ with your actual key in the above code sample.
Similarly, you can easily visualize Bing Maps, TomTom, Esri’s ArcGIS, OpenStreetMaps, and other map services in the Syncfusion® .NET MAUI Maps.
Output:
Conclusion:
I hope you enjoyed learning how to visualize Azure Maps in the .NET MAUI Maps (SfMaps).
You can refer to our .NET MAUI Maps feature tour page to learn about its other groundbreaking feature representations. Explore our .NET MAUI Maps documentation to understand how to present and manipulate data.
For current customers, you can check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to check out our .NET MAUI Maps and other .NET MAUI components.
Please let us know in the comments section below if you have any queries or require clarification. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!