[OpenLayers-Dev] Filter and BBOX in WFS layer

Thijs Brentjens lists at brentjensgeoict.nl
Wed Mar 12 10:38:47 EDT 2008


Hi list,

For a project I need to add a Filter to each WFS GetFeature request. In this
case to filter features for a specific user. Since the Filter isn't big, I'd
like to use the FILTER parameter of the KVP encoding. The current
implementation of a WFS layer always uses the BBOX parameter in the moveTo
function however. If adding the FILTER parameter, the WFS returns an
exception, because BBOX and FILTER are mutually exclusive.

People came across this before and a ticket has been created already:
http://trac.openlayers.org/ticket/1113.

Another solution is not to use the BBOX parameter at all and provide a
Filter (that may contain a Bbox constraint, only if you like that ;) ) in
the params of the layer. For this I made some small adjustments to the WFS
layer implementation. I've created a ticket with a patch here:
http://trac.openlayers.org/ticket/1430  With the useBbox option on a WFS
layer, the use of the BBOX parameter in GetFeature requests can be switched
off.

Hope this is useful for others as well.

Regards,
Thijs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20080312/8f64e4cf/attachment.html


More information about the Dev mailing list