OpenLayers Blog

All the maps that are fit to blog

Cluster Strategy

June 23rd, 2008 by Tim Schaub · 5 Comments

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: Future · Vector

5 responses 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.

  • 2 SSS // Aug 21, 2012 at 5:38 am

    Is it possible to drag individual features from cluster??So that i want to change location of one feature and remaining feature to stay there itself.

  • 3 Terry // Jan 12, 2013 at 3:05 am

    good !

  • 4 Hetry // Jan 12, 2013 at 3:07 am

    good ! Hey cool weblog, just wondering what anti-spam software you use for comments because i get lots on my blog. Anyway, in my language, there should not much good supply like this.
    http://vienne.co/vi-nu

  • 5 vi nam // Jan 12, 2013 at 3:08 am

    Iam 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.

Leave a Comment