ClusterGroup

geo.util. ClusterGroup

new ClusterGroup(opts)

Description:
  • This class manages clustering of an array of positions hierarchically. The algorithm and code was adapted from the Leaflet marker cluster plugin by David Leaver: https://github.com/Leaflet/Leaflet.markercluster .

Source:
Parameters:
Name Type Description
opts object

An options object

Properties
Name Type Attributes Description
maxZoom number <optional>

The maximum zoom level to calculate.

radius number <optional>

Size of clustering at zoom 0 in point gcs.

Methods

(protected) addPoint(point)

Description:
  • Add a position to the cluster group.

Source:
Parameters:
Name Type Description
point geo.geoPosition

A point to add to the cluster.

clusters(zoom) → {Array.<geo.util.ClusterTree>}

Description:
  • Return the clusters contained at a given zoom level.

Source:
Parameters:
Name Type Description
zoom number

The zoom level.

Returns:

The array of clusters.

Type
Array.<geo.util.ClusterTree>

points(zoom) → {Array.<object>}

Description:
  • Return the unclustered points contained at a given zoom level.

Source:
Parameters:
Name Type Description
zoom number

The zoom level.

Returns:

The array of unclustered points.

Type
Array.<object>