Warning
This is not an official Microsoft project. This was originally created as an experiment. Unless others are interested in contributing, I may not maintain this project long term.
This project is a .NET wrapper for the Azure Maps Web SDK. It is designed to be used in .NET MAUI, WinUI, and WPF applications. The goal of this project is to provide a .NET map control that has nearly all the same features and capabilities of the Azure Maps Web SDK with a similar API interface. Well over 95% of the core Azure Maps capabilities and many modules are exposed in this solution.
Note
This library is designed for performance and purposely supports a limited amount of data binding.
When loading the map you can set initial options in XAML but these will only be used when initializing the map and will not be used or updated after initialization.
Most of these settings can be updated using the methods provided by the map object, such as SetCamera and SetStyle.
Similarly their current values can be retrieved using getter methods such as GetCamera and GetStyle.
The camera state inparticular is also retrieved and included in all map events for simplicity.
Additional map properties may be made data bindable in the future.
| Platform | OS | Supported |
|---|---|---|
| .NET Maui | Windows | ✅ |
| .NET Maui | Android | ✅ |
| .NET Maui | iOS | ☑️ - Should work, not tested. |
| .NET Maui | macOS | ☑️ - Should work, not tested. |
| WinUI | Windows | ✅ |
| WPF | Windows | ✅ |
The versions running on Windows use WebView2, while the .NET Maui versions for other OS versions use the native WebView for that platform.
Note
If developing a .NET Maui Blazor app, consider using the AzureMapsControl.Components project.
Note
If you are migrating from Bing Maps WPF to Azure Maps and don't want to rewrite your app, take a look at this project where I have created a simple solution that redirects the Bing Maps requests to Azure Maps.
- Azure.Core.GeoJson - Wrapped for easier integration with Azure Maps REST clients.
- sqlite-net-pcl - Used for SQLite support.
- MauiHybridWebView - A cross platform WebView for .NET MAUI. Using an extended version that includes a pull request that adds proxy request support.
- Nearly any method that accesses information that may have changed within the map (e.g. state information) will be an asynchronous method.
- Tile layer options have been seperated into two classes;
TileSourceandMediaLayerOptions. - Vector and Elevation tiles can be specified using the
TileSourceclass or it's variants;CustomTileSource,MBTileSource, andZipTileSource. - Group animations are created using
MapAnimation.GroupAnimationstatic method rather than by creating a newGroupAnimationobject.
- See Features & Modules under consideration.
- Create and publish NuGet packages once project is stable.
We welcome contributions. Feel free to submit code samples, file issues and pull requests on the repo and we'll address them as we can. Learn more about how you can help on our Contribution Rules & Guidelines.
You can reach out to us anytime with questions and suggestions using our communities below:
Please read and follow our Code of Conduct.
MIT
See License for full license text.
