Reputation: 21
Microsoft announces 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 :
<Page ... xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps"> ... <Maps:MapControl MapServiceToken="{StaticResource MapCredentials}" /> ... </Page>
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
I'm trying to figure out the best way to migrate to Azure Maps from a Bing Maps project with minimal work.
Upvotes: 0
Views: 1305
Reputation: 17954
There is a long thread on this here: https://learn.microsoft.com/en-us/answers/questions/1685343/uwp-apps-using-mapcontrol-per-bing-map-enterprise
Note that the 2025 date is for free accounts. 2028 is the date for licensed accounts, however I don't think the UWP map control will be available that long (I'm not aware of any licensed users using the UWP map control, at least with any notable amount of traffic).
Using the Azure Maps Web SDK via a WebView is an option. I've done this many times with both the Bing Maps and Azure Maps Web SDK's over the years for WinForm, WPF, UWP, and Maui apps. I always found that the latest features usually go into the web SDK's first, and only a subset make it to native SDKs as it's a lot more work to get them into native SDKs.
Another option is that there are several open source native map controls that you could use if you want a native SDK. I would only go this route if there is a specific feature in the native SDK that isn't in the web SDK, or if you want to do all coding in the native language rather than an interlop with a WebView. From the performance side of things I've actually had better luck with web SDK's than native SDKs for most scenarios. Here are a few open source native map controls to consider.
Upvotes: 1