Search code examples
androidgoogle-mapsmarkerclusterer

android-how can i get exact number while implement cluster manager in google map in "Android" please give me proper answer if anyone have...?


How Can I get exact number in bucket of cluster manager?

Can anyone give me an example ? how to get exact like 42,35 instead of 20+,50+ etc ?


Solution

  • If you check the documentation of clustering in Google Maps Android API, you will see here on how to customize the marker cluster.

    It is stated here that the ClusterManager constructor creates a DefaultClusterRenderer and you can change the ClusterRenderer and the Algorithm using the setAlgorithm(Algorithm<T> algorithm) and setRenderer(ClusterRenderer<T> view) methods of ClusterManager.

    The DefaultClusterRenderer provides a base to start from, and to override this defaults, you need to subclass the DefaultClusterRenderer.

    For more information, you can check this thread and this sample code on how to customize the marker cluster.