Display a Map with .NET MAUI
.NET MAUI lacked a map control, so David Britch wrote a simple one — primarily as a gentle example of authoring custom controls with handlers. It displays, scrolls, zooms, and switches map imagery.
What you’ll learn
- Native map views — mapping a cross-platform
MaptoMKMapViewon iOS/Mac Catalyst and Android’sMapView(with no WinUI equivalent) - Handler architecture — implementing
IMap,IMapHandler, and a property mapper for a virtual view - Platform partial classes — splitting the handler across
MapHandler.Android.cs,.iOS.cs, and.Windows.cs - What it covers — scrolling, zooming, showing location and traffic, and changing between street/satellite/hybrid imagery
- Android setup — inserting your Google Maps API key into the Android manifest
Read the full post for the solution walkthrough and a link to the repo.