[OpenLayers-Users] Preloading WFS feature data [SEC=UNCLASSIFIED]
John Phan
J.Phan at bom.gov.au
Wed Feb 24 21:00:28 EST 2010
Hi,
I have a vector layer with some feature data. The layer is not visible at first (vectorLayer.setVisibility(false)), but made visible when user starts selecting an option. But I only want certain vector points drawn based on their feature attributes (i.e. vectorLayer.features.attributes.<data>).
When a user option is selected, I loop through all features (i.e. vectorLayer.features.length). Set renderIntent to no display ( OpenLayers.Style({display: "none"}) ) for the vector point if its feature attribute ( vectorLayer.features.attributes.<data> ) does not match user input.
This only works when all the feature data are loaded onto the browser. That is all features are drawn because I can't enter the loop the first time (length=0)
Does anyone know how to preload those features before the layer is made visible the first time?
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100225/68c4cecc/attachment.html
More information about the Users
mailing list