googlemaps/android-maps-utils — pull request #49 by choefele (2014-02-03 21:52:34+00:00)
Title: Markers at the same location

Thanks for this library.

In my app, I have several groups of markers with the same latitude/longitude value. My expectation is that markers at the same location still build a cluster, independent of the minimum cluster size that's configured in `DefaultClusterRenderer`.

Let's say that there are two markers at (52.0/13.0) and one at (52.01/13.01). Because `MIN_CLUSTER_SIZE` in `DefaultClusterRenderer` is currently set to 4, all three markers are separated and placed individually on the map. The two markers at the same location are not accessible by the user because they are rendered on top of each other. Instead, I would expect one cluster with two markers at (52.0/13.0) and the other marker rendered as individual marker.

To help the problem, I added `setMinClusterSize`/`getMinClusterSize` to make the minimum cluster size configurable. This way, I can set the minimum to 1, which will always cluster the markers. In addition, I added the method `isOneLocation` to `Cluster`, which allows me to check for clusters that consist of markers at the same location.

Could you please have a look at my additions. Happy to hear your opinion on this problem.