@googlemaps/js-markerclusterer

    Class SuperClusterAlgorithm

    A very fast JavaScript algorithm for geospatial point clustering using KD trees.

    https://www.npmjs.com/package/supercluster for more information on options.

    Index

    Constructors

    Properties

    clusters: Cluster[] = []
    markers: Marker[] = []
    maxZoom: number
    state: { zoom: number } = ...
    superCluster: Supercluster

    Methods

    • Helper 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})
      }
      }

      Type Parameters

      Parameters

      • __namedParameters: T

      Returns Cluster[]

    MMNEPVFCICPMFPCPTTAAATR