I\'m using android maps utils for clustering the markers on google maps api v2. It worked fine, but when I added 2000+ markers, on max zoom it is still clustered (markers st
You can extend DefaultClusterRenderer class and set minimum markers to cluster.
public class InfoMarkerRenderer extends DefaultClusterRenderer {
public InfoMarkerRenderer(Context context, GoogleMap map, ClusterManager clusterManager) {
super(context, map, clusterManager);
//constructor
}
@Override
protected void onBeforeClusterItemRendered(final MyCustomMarker infomarker, MarkerOptions markerOptions) {
// you can change marker options
}
@Override
protected boolean shouldRenderAsCluster(Cluster cluster) {
return cluster.getSize() > 5; // if markers <=5 then not clustering
}
}