Calculates an array of Cluster. Calculate is separate from cluster as it does preprocessing on the markers such as filtering based upon the viewport as in AbstractViewportAlgorithm. Caching and other optimizations can also be done here.
Protected
clusterClusters the markers and called from calculate.
Protected
noopHelper function to bypass clustering based upon some map state such as zoom, number of markers, etc.
cluster({markers, map}: AlgorithmInput): Cluster[] {
if (shouldBypassClustering(map)) {
return this.noop({markers})
}
}
Noop algorithm does not generate any clusters or filter markers by the an extended viewport.