Class: IWClusteringAlgorithm

IWClusteringAlgorithm

Abstract base class for clustering algorithms. These are used by IWClusteredOverlayLayer to cluster the hits.

new IWClusteringAlgorithm()

Default Constructor.

Methods


calculateClusters(hits, zoomLevel)

Returns clusters containing the specified hits. The result is an array of objects describing the clusters. Each cluster has a coordinate and a property hits which is an array of all hits contained in this cluster.
Parameters:
Name Type Description
hits array an array of objects with the hits to cluster
zoomLevel number the zoom level of the map
Returns:
the clusters
Type
array

setOptions(options)

Sets the options for this clustering algorithm.
Parameters:
Name Type Description
options object an object with the options
Returns:
Type
void