new ClusterTree(group, zoom, childrenopt)
- Description:
- This class manages a group of nearby points that are clustered as a single object for display purposes. The class constructor is private and only meant to be created by the ClusterGroup object. - This is a tree-like data structure. Each node in the tree is a cluster containing child clusters and unclustered points. 
 
- Source:
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| group | geo.util.ClusterGroup | The source cluster group | |
| zoom | number | The zoom level of the current node | |
| children | Array.<object> | <optional> | An array of ClusterTrees or point objects | 
Methods
coords() → {geo.geoPosition}
- Description:
- Get the coordinates of the cluster (the mean position of all the points contained). This is lazily calculated and cached. 
 
- Source:
Returns:
The 2-d coordinates of the center.
- Type
- geo.geoPosition
count() → {number}
- Description:
- Return the total number of child points contained in the cluster. 
 
- Source:
Returns:
Total points contained
- Type
- number
each(func)
- Description:
- Recursively call a function on all points contained in the cluster. Calls the function with - thisas the current ClusterTree object, and arguments to arguments the point object and the zoom level:- func.call(this, point, zoom).
 
- Source:
Parameters:
| Name | Type | Description | 
|---|---|---|
| func | function | The function to call. |