I have to place different markers on a GoogleMap from the Google Maps Android v2 API. The problem is that multiple markers are set to the same position (lat/lng), so the user only sees the "newest" marker.
Is there a possibility (in the best case: a library) that clusters different markers from the same area (in relation to the zoomlevel)?
I've already read about the MarkerClusterer, but this is designed for the JavaScript API.
Marker clusters is the concept of sampling the data values into larger blocks in order to ease readability and increase performance. It is a simple solution to display a large number of markers on a map, or a chart. The number on a cluster shows how many markers it contains.
Markers are objects of type Marker , and are added to the map with the GoogleMap. addMarker(markerOptions) method. Markers are designed to be interactive. They receive click events by default, and are often used with event listeners to bring up info windows.
Google has provided a utility to do this as part of their Google Maps Android API Utility Library:
https://developers.google.com/maps/documentation/android/utility/marker-clustering
with the source at:
https://github.com/googlemaps/android-maps-utils
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With