[OpenLayers-Dev] Problem with cluster strategy
eric.c2c at gmail.com
Wed Nov 26 17:11:36 EST 2008
What about registering a beforefeaturesadded listener and having this
listener calculate the max value? That should do the trick...
2008/11/26, Jerome Freyre <jerome.freyre at hispeed.ch>:
> Hi Ivan,
> Ok for the sample but the main goal of my post was a suggestion to display
> correctly the cluster on a map.
> I think that the sample is not a correct representation of the reality.
> The addition of a function that get the max value present permit to display
> correctly the cluster and have a radius that correspond to the reality.
> In the sample formula, if you have a cluster that aggregate 100 features and
> an other that aggregate 20 feature they will be displayed with the same
> With my function the radius will be correctly adapted and we have a correct
> representation of the reality
> Ivan Grcic-2 wrote:
>> HI Jerome,
>> Function Math.min(feature.attributes.count, 7) + 3 was just a sample
>> in the demo. You can use whatever function you need, just take care to
>> make it as simple as possible, because it runs trought it for every
>> feature in cluster.
>> Cheers, Ivan
>> Ivan Grcic
>> Dev mailing list
>> Dev at openlayers.org
> View this message in context:
> Sent from the OpenLayers Dev mailing list archive at Nabble.com.
> Dev mailing list
> Dev at openlayers.org
More information about the Dev