new geo.util.ClusterGroup(opts)
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
|
Methods
-
protectedaddPoint(point)
-
Add a position to the cluster group.
Name Type Description point
geo.geoPosition A point to add to the cluster.
-
clusters(zoom){Array.<geo.util.ClusterTree>}
-
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.