CentroidNonHierarchicalDistanceBasedAlgorithm
open class CentroidNonHierarchicalDistanceBasedAlgorithm<T : ClusterItem?> : NonHierarchicalDistanceBasedAlgorithm<T>
A variant of NonHierarchicalDistanceBasedAlgorithm that clusters items based on distance but assigns cluster positions at the centroid of their items, instead of using the position of a single item as the cluster position.
This algorithm overrides getClusters to compute a geographic centroid for each cluster and creates StaticCluster instances positioned at these centroids. This can provide a more accurate visual representation of the cluster location.
Parameters
<T>
the type of cluster item
Functions
Link copied to clipboard
Adds a collection of items to the algorithm
Link copied to clipboard
Link copied to clipboard
Returns clusters of items for the given zoom level, with cluster positions set to the centroid of their constituent items rather than the position of any single item.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Removes an item from the algorithm
Link copied to clipboard
Removes a collection of items from the algorithm
Link copied to clipboard
Link copied to clipboard
Updates the provided item in the algorithm