Home

Awesome

XAML Map Control

A set of controls for WPF, WinUI and Avalonia UI for rendering raster maps from different providers and various types of map overlays.

Map providers can easily be added by specifying a template string for their map tile URLs. Map overlay layers allow to draw and interact with graphical objects and pushpins on the map. The Map Control API is similar to the Microsoft Bing Maps Control for WPF, except that no API key is required.

The project includes sample applications for all platforms, which demonstrate the features of XAML Map Control.

Map Control supports multiple map projections. However, the MapTileLayer class only works with WebMercatorProjection. For other projections, an appropriate WmtsTileLayer or WmsImageLayer could be used.


Main classes are


The TileImageLoader class uses IDistributedCache for optional caching of map tile bitmaps. By default, the cache is a MemoryDistributedCache instance with all default options.

Map Control provides three minimal IDistributedCache implementations for persistent caching:

You can of course also use a full-featured cache like RedisCache.

To try the sample application with persistent caching, add an appropriate package reference to its Visual Studio project and uncomment the respective TileImageLoader.Cache assignment in MainWindow.xaml.cs.

Please note that some map providers may not allow persistent caching of their map data.


XAML Map Control is available on NuGet, as a set of framework-specific packages with Package Ids

There are also packages for an extension library with additional map projections, based on ProjNET4GeoAPI, with Package Ids

and a library for MBTiles support, with Package Ids

FileDbCache and SQLiteCache are available with Package Ids


The project is not open for contributions. Pull requests will not be accepted.