Protected
clustersProtected
gridProtected
maxProtected
maxProtected
stateProtected
viewportProtected
addProtected
clusterProtected
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})
}
}
The default Grid algorithm historically used in Google Maps marker clustering.
The Grid algorithm does not implement caching and markers may flash as the viewport changes. Instead use SuperClusterAlgorithm.