Hi!<br><br>I've been looking at an old conversation (Aug 2008) with the same subject as this where 'Todd Brenningmeyer' tried to use a cql-filter / filter on a OpenLayers.Layer.WFS with no luck. <br><br>var wfsLayer = new OpenLayers.Layer.WFS("My layer",<br>
<a href="http://localhost:8080/geoserver/wfs">http://localhost:8080/geoserver/wfs</a>,<br>
{<br>
styleMap: myStyle<br>
}<br>
);<br>
wfsLayer.mergeNewParams({'CQL_FILTER': 'id=1'});<br><br>He found out that OpenLayers added a BBOX at the end of the request.<br><br>I dug a little bit further and found out that this ALWAYS is added in the moveTo function of OpenLayers.Layer.WFS. When a filter or cql filter is used in the same request as a bbox to a GeoServer you get the following response:<br>
<font style="font-family: arial,helvetica,sans-serif;" size="2"></font><pre style="font-family: arial,helvetica,sans-serif;"><font size="2"><?xml version="1.0" ?><br><ServiceExceptionReport<br> version="1.2.0"<br>
xmlns="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>"<br> xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"<br> xsi:schemaLocation="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a> <a href="http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd</a>"><br>
<ServiceException>filter and bbox both specified but are mutually exclusive</ServiceException><br></ServiceExceptionReport></font></pre>What would be the correct way to exclude the bbox parameter from the request? I would really not like to use Todd's workaround and use a GML layer!<br>
<br>Regards,<br>Per Engström<br>