[OpenLayers-Dev] Re: cluster strategy not displaying all features until zoom out/in

crb jcbeaude at yahoo.com
Mon Oct 4 16:54:17 EDT 2010


Figured out (sort of) what was happening here:  for some reason, my
locsLayerDef.addFeatures(locFeatures) lagged the contents of the locFeatures
array by one pan/zoom event.  I could see that the locFeatures array
correctly contained all features that were (correctly) returned by the
server based on the map extent after the zoom (i.e. at the zoomend event). 
But as long as I didn't do a locsLayerDef.destroyFeatures() before the
addLayer(), the contents of the layer were not updated with the current
contents of the locFeatures array (until the next pan/zoom event).  Adding
'locsLayerDef.destroyFeatures()' before the addFeatures() fixes this, which
is probably the way it should be done anyway.
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/cluster-strategy-not-displaying-all-features-until-zoom-out-in-tp5596336p5600826.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list