I am using the Google Map Android clustering Utitlity With Google Maps v2 play services.
I am not getting the behavior I expected. As you can see in the two images
You can change your minimum cluster size. By Default minimum cluster size is 4 defined in map-utils library as below.
/**
* If cluster size is less than this size, display individual markers.
*/
private int mMinClusterSize = 4;
/**
* Determine whether the cluster should be rendered as individual markers or a cluster.
*/
protected boolean shouldRenderAsCluster(Cluster cluster) {
return cluster.getSize() > mMinClusterSize;
}
Or you can override shouldRenderAsCluster method in your extended DefaultClusterRenderer class as below:
@Override
protected boolean shouldRenderAsCluster(Cluster cluster) {
// Always render clusters.
return cluster.getSize() > 1;
}