OpenLayers Blog

All the maps that are fit to blog

Cluster Strategy

June 23rd, 2008 by tschaub · 1 Comment

Following up on the paging strategy, I’ve put together a cluster strategy as an alternative for managing large numbers of (potentially coincident) features.

The cluster strategy intercepts batches of features before they are added to a layer. It caches all features, creates points that represent clusters of features, and sends the clusters to the layer instead. The original features are accessible through a cluster property on the features added to the layer. This works for features with all geometry types (clustering based on bounds center for non-point) and always calculates clusters as point locations.

The cluster example uses the same photo feed as the paging example. Just another strategy for dealing with large numbers of features client side.

Tags: Vector · Future

1 response so far ↓

  • 1 PawPrint.net // Jul 12, 2008 at 11:19 am

    Brilliant! I have been building this type of thing into my mini-wfs server but it would be great if OL could do it directly.

Leave a Comment