[OpenLayers-Users] cluster strategy filtering

Didrik Pinte lists at dipole-consulting.com
Thu Nov 6 02:41:13 EST 2008


On Wed, 2008-11-05 at 15:19 -0700, Tim Schaub wrote:

> My suggestion to a similar inquiry [1] was to add a threshold property 
> to the cluster strategy.  If a cluster contains fewer features than the 
> threshold, the original features are added to the layer instead of a 
> cluster.
> 
> You can find a ticket with a patch for this here:
> http://trac.openlayers.org/ticket/1815
> 
> Note that you can also listen for "featureadded" on the layer and 
> manipulate the cluster to your heart's content.
> 
> layer.events.on({
>      "featureadded": function(event) {
>          var feature = event.feature;
>          if(feature.cluster) {
> 	    feature.attributes.foo = "I'm a cluster";
>          }
>      }
> });
> 
> Tim

Hi Tim,

Thanks for the link to the patch. This is exactly what I needed.

Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081106/1185c476/attachment.bin


More information about the Users mailing list