Class: ClusterGroup

geo.util. ClusterGroup

new geo.util.ClusterGroup(opts, maxZoom, radius)

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 .

Name Type Description
opts object

An options object

maxZoom number

The maximimum zoom level to calculate.

radius number

Size of clustering at zoom 0 in point gcs.

Methods

protectedaddPoint(point)

Add a position to the cluster group.

Name Type Description
point geo.geoPosition

A point to add to the cluster.

Return the clusters contained at a given zoom level.

Name Type Description
zoom number

The zoom level.

Returns:
Type Description
Array.<geo.util.ClusterTree> The array of clusters.

points(zoom){Array.<object>}

Return the unclustered points contained at a given zoom level.

Name Type Description
zoom number

The zoom level.

Returns:
Type Description
Array.<object> The array of unclustered points.