[OpenLayers-Users] How Do I Access Lines in a WFS layer
via JavaScript?
Christopher Schmidt
crschmidt at metacarta.com
Thu Sep 4 10:02:08 EDT 2008
On Thu, Sep 04, 2008 at 07:35:33AM -0600, Bill Thoen wrote:
> Never mind... I figured it out. Apparently the geometries DO get loaded
> into a WFS layer's features array, but they are loaded asynchronously,
> so if you check for features too soon after setting the layer on the map
> you won't find any features.
>
> Now if there is an event that can detect when the features are loaded
> and then call my function to cycle through them that would make my day.
http://dev.openlayers.org/apidocs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.EVENT_TYPES
"loadend: Triggered when layer loading ends."
> Bill Thoen wrote:
> > I've got a collection of lines in a WFS map layer, and I can access them
> > interactively with a selection control, but I want to be able to step
> > trough them one by one via JavaScript. I can't seem to find where the
> > lines are stored. The layer's features array is empty and so is the
> > markers, yet I can see and select the lines from this layer. I just
> > can't find them in the layer object. Are they stored in some other
> > object? How do I get one of these lines into a variable so I can work
> > with it?
> >
> >
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list