.netopenstreetmapmaui

Use OpenStreetMap (OSM) with .Net Maui control "Microsoft.Maui.Controls.Maps"


With the MAUI control Microsoft.Maui.Controls.Maps released in .net 7.0 it is possible to load Google Maps into the control. I tried this with the sample project MapDemo and it works very well.

I would like to use OSM (OpenStreetMap) as map source instead of Google Maps. Is there any support for OSM with this control?


Solution

  • This is not possible because the MAUI map handler MapElementHandler uses the default map provider of the system:

    Android:

    Xamarin.GooglePlay.Services.Maps

    iOS:

    Microsoft.iOS.MKMapView


    Alternatively use the WebView Control and additional libraries to display another map or MapsUI (Preview).