[OpenLayers-Dev] GetFeature control doesn't select from WFS with multiple feature types.

Marc Pfister MPfister at enplan.com
Fri Mar 12 19:28:20 EST 2010

I have a  GetFeature control on a WFS layer with more than one featureType. The WFS protocol is derived from a WMS  OpenLayers.Layer that has two layers declared.

Clicking on a feature returns a valid response but no features are selected. If I change the WMS OpenLayers.Layer configuration to only have one layer and click on the same feature I get the same response, with the exception that within the schema section only one layer is mentioned instead of two. The GML is identical.

I've tracked it as far as when the response is parsed in XML.js. The Format.WFST.v1_1_0 object shows a featureType of "layer1,layer2" but singleFeatureType is True. If I override singleFeatureType to False in Firebug, it works.

So do I need to declare singleFeatureType to false somewhere? Or should the code figure out that my featuretype is actually a list and then set singleFeatureType to true when the object is created?

http://trac.openlayers.org/ticket/1838 seems similar, but pertains to Format.GML.

I'm using OpenLayers from SVN, and MapServer for the WMS.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20100312/98b12cbe/attachment.html

More information about the Dev mailing list