Mapsui / Mapsui

Mapsui is a .NET Map component for: MAUI, WPF, Avalonia, Uno, Blazor, WinUI, Xamarin and Eto
https://mapsui.com
MIT License
1.24k stars 319 forks source link

Is there support for highlighting buildings in Open Street Maps using MapsUI for Xamarin Forms #754

Closed BrianVance closed 4 years ago

BrianVance commented 4 years ago

Well this isn't a issue but more of a query. I need to highlight buildings close to my position in Open Street Maps. I am using the Mapsui for Xamarin Forms and was wondering if this feature was possible? I took the below screenshot from Open Street Maps while editing the maps and I noticed it highlighted the buildings in my view. My would like to achieve the same effect using Mapsui (Notice the buildings highlighted in red). Any thoughts?

image

BrianVance commented 4 years ago

I also discovered a feature that would help me with my situation. The below screenshot showcases Open Street Map with "Map Data" option checked which highlights buildings. Do we have an option to enable this in MapsUI? https://wiki.openstreetmap.org/wiki/Map_Data_layer

image

charlenni commented 4 years ago

If you edit OpenStreetMaps, than you use vector data. If you use Mapsui, than you use bitmap data. The later one has no informations about streets or buildings. It is only a picture of the map after someone has rendered the vector data for you.

For this you have to use vector data with a special style and a renderer, that convert both into bitmap map tiles. This could be done by some services in the internet, e.g. Mapbox.

BrianVance commented 4 years ago

@charlenni I have a shape file that contains the building shapes. Can MapsUI for Xamarin Forms 2.0 load a Shape File? I wanted to save the shape file on an android device and load it through a Xamarin Forms app. I noticed a project titled Mapsui.Desktop which had a ShapeFile class but I could not use it in the Mapsui.Forms 2.0 library.

charlenni commented 4 years ago

Mapsui could load some types of shape files. See the samples here. The Xamarin.Forms implementation hasn't a special wrapper for this, but you could use MapView.Map for this.