[OpenLayers-Users] Clustering and addFeatures method
arno974
arnaud.sig at gmail.com
Wed Oct 22 06:33:04 EDT 2008
Hello Yves,
Tried to add a new OpenLayers.Strategy.Fixed(), in your strategies and it
should work.
I noticed that the cluster doesn't work if i don't use the fixed strategy.
Maybe a bug or i didn't use it in a good way.
Here you will find an example : http://geotribu.net/?q=node/47
Regards
Arnaud
Yves Jacolin (free) wrote:
>
> Hello,
>
> I am trying to set up a cluster strategy for one of my vector layer. I add
> this code to my existing code:
> var vector = new OpenLayers.Layer.Vector(name,
> {
> strategies: [
> new OpenLayers.Strategy.Cluster({distance:20})
> ]
> }
> );
> Before this, the code was " var vector = new
> OpenLayers.Layer.Vector(name);"
>
> I fill my vectorLayers later, reading a postgis result with:
>
> var feature = wktParser.read(_tmp[1]);
> [..]
> vectorLayer.addFeatures([ feature ]);
>
> I get only one feature (instead of 2) for all the zoom level. I tried to
> change the distance option above, but nothing append. If I check the DOM,
> nothing show me that there are more than 1 feature in this layer.
>
> Where am I wrong?
>
> Y.
> PS : the code is much more longer than here and is split in several
> functions
> so I can't show you all in once, I tried to put the most readable as
> possible.
> --
> Yves Jacolin
> ---
> http://softlibre.gloobe.org
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://www.nabble.com/Clustering-and-addFeatures-method-tp20015526p20108044.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list