/** * Gets the "bucket" for a particular cluster. By default, uses the number of points within the * cluster, bucketed to some set points. */ protected int getBucket(Cluster<T> cluster) { int size = cluster.getSize(); // if (size <= BUCKETS[0]) { // return size; // } // for (int i = 0; i < BUCKETS.length - 1; i++) { // if (size < BUCKETS[i + 1]) { // return BUCKETS[i]; // } // } // return BUCKETS[BUCKETS.length - 1]; return size; }
/** Determine whether the cluster should be rendered as individual markers or a cluster. */ protected boolean shouldRenderAsCluster(Cluster<T> cluster) { return cluster.getSize() > MIN_CLUSTER_SIZE; }