[OpenLayers-Dev] Problem with cluster strategy
Eric Lemoine
eric.c2c at gmail.com
Wed Nov 26 17:11:36 EST 2008
Hi Jérome
What about registering a beforefeaturesadded listener and having this
listener calculate the max value? That should do the trick...
Eric
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
> radius.
>
> With my function the radius will be correctly adapted and we have a correct
> representation of the reality
>
> Sincerly,
> Jérome
>
>
>
> 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
>> http://openlayers.org/mailman/listinfo/dev
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-cluster-strategy-tp20701364p20702430.html
> Sent from the OpenLayers Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
More information about the Dev
mailing list