-
- All Implemented Interfaces:
-
com.google.maps.android.clustering.algo.Algorithm
public class ContinuousZoomEuclideanCentroidAlgorithm<T extends ClusterItem> extends CentroidNonHierarchicalDistanceBasedAlgorithm<T>
A variant of CentroidNonHierarchicalDistanceBasedAlgorithm that uses continuous zoom scaling and Euclidean distance for clustering.
This class overrides getClusters to compute clusters with a zoom-dependent radius, while keeping the centroid-based cluster positions.
-
-
Method Summary
Modifier and Type Method Description Set<out Cluster<T>>getClusters(float zoom)Returns clusters of items for the given zoom level, with cluster positionsset to the centroid of their constituent items rather than the position ofany single item. -
Methods inherited from class com.google.maps.android.clustering.algo.NonHierarchicalDistanceBasedAlgorithm
addItem, addItems, clearItems, getItems, getMaxDistanceBetweenClusteredItems, removeItem, removeItems, setMaxDistanceBetweenClusteredItems, updateItem -
Methods inherited from class com.google.maps.android.clustering.algo.AbstractAlgorithm
lock, unlock -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getClusters
Set<out Cluster<T>> getClusters(float zoom)
Returns clusters of items for the given zoom level, with cluster positionsset to the centroid of their constituent items rather than the position ofany single item.
- Parameters:
zoom- the current zoom level
-
-
-
-