Forum Discussion

COM-ADD's avatar
COM-ADD
Copper Contributor
May 23, 2024

Migrating from “Bing Maps” to “Azure Maps”.

Hello,

 

I have just received your email announcing the end of support for “Bing Maps” on June 30, 2025. This service is being replaced by “Azure Maps”.

 

Currently I use the C# object: Windows.UI.Xaml.Controls.Maps.MapControl , with the associated Xaml: xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps" and <Maps:MapControl MapServiceToken="{StaticResource MapCredentials}" />.

 

I saw that there is an Azure.ResourceManager.Maps package but this package does not have a native component for Xaml. It looks like I need to use the WebView component ( <WebView x:Name="mapWebView" /> ) instead.

 

This WebView displays an HTML page with JavaScript code that calls the https://atlas.microsoft.com/sdk/javascript/mapcontrol/2/atlas.min.js code to perform authentication via a YOUR_AZURE_MAPS_KEY and displays a map to the screen.

 

Can anyone confirm this method of using "Azure Maps" with a Xaml project?

 

Thanks in advance,

Best regards

C-A

 

2 Replies

  • Ricky_Brundritt's avatar
    Ricky_Brundritt
    Copper Contributor

    COM-ADD Correct, to use the Azure Maps Web SDK in a XAML app you would need to create a web page and load it into a WebView. Using WebView2 is recommended as there are a lot of issues with the original WebView, such as limited WebGL support and poor performance. With WebView2 the performance of the Azure Maps Web SDK appears to be as good or better than using a native SDK.

     

    If you are developing/updating a UWP app, I have a simple code sample here: https://github.com/rbrundritt/SimpleUwpAzureMaps

     

    I'm also working creating a Maui library wrapper around the Azure Maps Web SDK and hope to have that online in the next month or two.

  • COM-ADD's avatar
    COM-ADD
    Copper Contributor

    COM-ADD I found this discussion on the same topic: https://learn.microsoft.com/en-us/answers/questions/1685343/uwp-apps-using-mapcontrol-per-bing-map-enterprise