new IWKMeansClustering()
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 clustering options. The only property i k which is the number of clusters to build.
Example:var clustering = new IWKMeansClustering(); clustering.setOptions({ k: 100 });
Parameters:
Name Type Description options
object the options Returns:
- Type
- void