Open smitha-cgi opened 1 year ago
Hi @PureWeen , @jsuarezruiz and @jfversluis
Is there any news on this feature? Is a very important feature when you work with maps in real production applications, you are not gonna show hundreds/thousands of pins on the map.
This is exposed by Maps providers and their SDK's Android: https://developers.google.com/maps/documentation/android-sdk/utility/marker-clustering iOS: https://developer.apple.com/documentation/mapkit/mkannotationview/decluttering_a_map_with_mapkit_annotation_clustering
So by exposing it also the CommunityToolkit.Maps would be able to provide it for windows devices.
This feature will save a lot of time and will make maps more productions ready control than current just show demo control
Unfortunately there is nothing to share at this moment.
What could help move this forward is think a bit more about what a unified API might look like to you and share that. Maybe even a proof of concept or a PR providing the basic functionality of this.
I'm afraid I don't have any timeline for this right now.
I would propose the public api that was proposed by @smitha-cgi in this issue
Public API Changes Something like this:
map.ClusterShapeTextColor = Colors.White; map.ClusterShapeColor = Colors.IndianRed; map.ClusterShapeRadius = 20; map.ClusterDistance = Distance.FromKilometers(5); map.IsClustering = true;
Then Maui code internally should manage which collection on each platform will contain the pins depending the IsClustering value.
For iOS I see that the needed classes are in MAUI source code but for Android I think the package Xamarin.GoogleServices.Map does no include the Android Maps cluster package so needs a refactor on that component to expose them.
Our team is also requiring map clustering in our .NET MAUI application
Any updates on this?
Any updates? The current implementation is a minimum version.
Any updates for this feature? Appreciate it if there is an update for this.
Any updates (on this feature or any other, frankly) would be much appreciated!
Did someone accomplish to integrate map pins clusters using native Android Java Binding Libraries ?
I also need this for a commercial application with thousands of pins. Is there any way to deal with lots of locations using native mapping on Android and iOS using Maui?
Hi @jamesmontemagno, is there any update on when issue #11811 will be implemented? In production applications that use maps, displaying 1000 pins at once is not ideal. It would be great to have a solution for this.
Hi @jamesmontemagno, is there any update on when issue #11811 will be implemented? In production applications that use maps, displaying 1000 pins at once is not ideal. It would be great to have a solution for this.
I don't think it will ever be implemented by the MAUI Team. It will be the same it was with Xamarin, someone with enough free time will create a nuget package for it.
Hey guys, if u need it u can use https://github.com/themronion/Maui.GoogleMaps. Although keep in mind, only iOS and Android are supported and it uses Google maps on iOS as well.
Hey guys, if u need it u can use https://github.com/themronion/Maui.GoogleMaps. Although keep in mind, only iOS and Android are supported and it uses Google maps on iOS as well.
That is a great contribution @themronion ! Great work
Description
Showing thousands of pins on the map works, but it takes a long time to render them all, and the map is then extremely cluttered. Pins should be grouped together in clusters which are then only expanded into pins as the map is zoomed in or out.
Could potentially be done using this on Android and this on iOS. I have written something custom for my MAUI app on Android (storing list of locations in memory and then dynamically painting cluster markers on the map when camera changes), happy to provide some example code if someone can work out how to get it to fit into MAUI and do the same thing on iOS.
Public API Changes
Something like this:
map.ClusterShapeTextColor = Colors.White; map.ClusterShapeColor = Colors.IndianRed; map.ClusterShapeRadius = 20; map.ClusterDistance = Distance.FromKilometers(5); map.IsClustering = true;
This is assuming that the cluster object is a simple circle with a number inside it that indicates how many locations it represents.
Intended Use-Case
Show thousands of locations on a map without it getting overloaded trying to draw individual pins for each location