Hi, vector layer doesnt load features if it is not visible. What strategy&protocol are you using?
On Fri, Dec 18, 2009 at 11:29 PM, cgp <[email protected]> wrote: > > When I start up my application, I add all the WFS layers and do > setVisibility(false). Right after start up I attempt to access the WFS layer > features with wfs_layer.features but it returns null. However, when I run > setVisibility(true) and then setVisibility(false) right away, > wfs_layer.features now returns all the features. > > I don't completely understand how OpenLayers works, but does this mean that > the WFS layers are not actually loaded onto the map if onstartup I call > setVisibility(false)? > > My goal is to access the features without having to display the WFS layer. > On my previous post > http://n2.nabble.com/Is-there-a-way-to-dynamically-get-the-feature-id-of-a-feature-from-a-WMS-layer-td4183834.html#a4183834 > here , I am doing this because I need to get the ID of a particular feature. > (Unless someone else has a more efficient way of doing this, please let me > know). > > Thanks for your help. > -- > View this message in context: > http://n2.nabble.com/Trouble-with-accessing-vector-WFS-layer-features-tp4189252p4189252.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
