<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16609" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV dir=ltr><FONT face=Arial size=2>I also just struggled with this over the
past week and came to the same conclusion as you. OpenLayers WFS layer class
just will not work with a FILTER as it is now.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>It also uses LoadURL which is hardcoded to
use GET, so you can't use anything but fairly simple filters.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>I did not need the BBOX information for my
requests, although you can include it in the FILTER and in that way use
both BBOX & FILTER methods to narrow the features returned.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>I ended up just using XHR via
OpenLayers.Ajax.Request to get the features I needed since I had to use POST due
to the FILTER length.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>I then used the GML parser and loaded the
features into a vector layer.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Another note about using POST in
OpenLayers:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>the correct option to use for specifying
the body of the POST request directly is "postBody".</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>This is not documented anywhere that I
could find and not as obvious as the other options.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Matt Priour<BR>Kestrel Computer
Consulting<BR><A
title="http://www.kestrelcomputer.com CTRL + Click to follow link"
href="http://www.kestrelcomputer.com">www.kestrelcomputer.com</A></FONT></DIV>
<DIV dir=ltr><FONT face=Arial
size=2>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>Hi
list,<BR><BR>For a project I need to add a Filter to each WFS GetFeature
request. In this<BR>case to filter features for a specific user. Since the
Filter isn't big, I'd<BR>like to use the FILTER parameter of the KVP encoding.
The current<BR>implementation of a WFS layer always uses the BBOX parameter in
the moveTo<BR>function however. If adding the FILTER parameter, the WFS
returns an<BR>exception, because BBOX and FILTER are mutually
exclusive.<BR><BR>People came across this before and a ticket has been created
already:<BR></FONT><A href="http://trac.openlayers.org/ticket/1113"><FONT
face="Times New Roman"
size=3>http://trac.openlayers.org/ticket/1113</FONT></A><FONT
face="Times New Roman" size=3>.<BR><BR>Another solution is not to use the BBOX
parameter at all and provide a<BR>Filter (that may contain a Bbox constraint,
only if you like that ;) ) in<BR>the params of the layer. For this I made some
small adjustments to the WFS<BR>layer implementation. I've created a ticket
with a patch here:<BR></FONT><A
href="http://trac.openlayers.org/ticket/1430"><FONT face="Times New Roman"
size=3>http://trac.openlayers.org/ticket/1430</FONT></A><FONT
face="Times New Roman" size=3> With the useBbox option on a
WFS<BR>layer, the use of the BBOX parameter in GetFeature requests can be
switched<BR>off.<BR><BR>Hope this is useful for others as
well.<BR><BR>Regards,<BR>Thijs</FONT></FONT></DIV></BLOCKQUOTE>
<DIV dir=ltr><FONT face=Arial size=2><FONT face="Times New Roman"
size=3>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>></FONT><BR></DIV></FONT></BODY></HTML>