[OpenLayers-Users] filtering WFS layers

David Herbert darb1 at bas.ac.uk
Fri Sep 7 10:11:27 EDT 2007


I have a requirement to apply a property filter to a WFS layer of my map
e.g:

<Filter>
<PropertyIsEqualTo>
<PropertyName>species</PropertyName>
<Literal>chinstrap penguin</Literal>
</PropertyIsEqualTo>
</Filter>

for a WFS layer displaying bird colonies.  Looking at the docs at:

http://dev.openlayers.org/docs/files/OpenLayers/Layer/WFS-js.html 

leads me to believe a method called mergeNewParams is available, which
will modify the layer parameters and redraw it.  I am using OL 2.4
stable.  However, trying to use this method results in "mergeNewParams
is not a function" errors.  Looking at WFS.js, I see this method is not
there.  Should it be? If not, what's the best approach to filtering
layers this way? Should I remove the layer and recreate with new
parameters? Or is there a better way?

Thanks for any help,

David Herbert
British Antarctic Survey.

--  
This message (and any attachments) is for the recipient only.  NERC is subject
to the Freedom of Information Act 2000 and the contents of this email and any
reply you make may be disclosed by NERC unless it is exempt from release under
the Act.  Any material supplied to NERC may be stored in an electronic
records management system.




More information about the Users mailing list