A ragbag library by Xavier Mamano for use with OpenLayers.
This mixed bag containing several components, which are not related to each other.
The components
- Improve drawing tools to add behaviors related to del-key and esc-key
- Extends KML format to load StyleMap with "normal" and "highlight"
- CenteredCluster strategy
Centered Clusters
The OL Cluster algorithm is simple and efficient, but a cluster with two points shown centered on one of them.
The CenteredCluster proposal uses the OL algorithm as the main piece to group points and subsequently refine cluster. Enough to improve outcome: clusters with few points are shown centered. Less cluster with more points, and is satisfied that all points are within the selected distance. There may be fewer clusters closer than the distance set, but if presents, are few and the separation between them is not much smaller than the set distance.
NOTE: This represents a considerable increase of the calculations to be performed, but has been done a implementation to optimize performance, so in the majority of cases CenteredCluster is as fast as than OL Cluster strategy.
Other improvements
Methods activate and deactivate makes cluster and uncluster the features.