I am trying to get my WFS server to return a filtered set of results (to avoid browser overload). I had previously been sending a FILTER param in the url - but now this is breaking because of the fact BBOX and FILTER are mutually exclusive (tickets #1430 and #1113). I attempted the patch in #1430 but it did not seem to work for me.<br>
<br>I have been attempting to instead use the Openlayers.Filters - but it is just returning the whole of the WFS dataset (unfiltered). I was under the impression that you could use an Openlayers Filter to filter the data (as well as apply a style). Having checked the documentation it looks like only a GeoJSON layer has the option of adding a filter - is this true and if so is there any plans to include this v. useful functionality in the WFS layer? Alternatively are there any plans to fix the FILTER/BBOX error?<br>
<br>Many thanks<br><br>Stuart<br><br><br>Code Snippets:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><pre id="line379">function getDefaultStyle(sld, layerName) {<br>
            var styles = sld.namedLayers[layerName].userStyles;<br>            var style;<br>            for (var i=0; i&lt;styles.length; ++i){<br>                    style = styles[i];<br>                   if(style.isDefault) {<br>
                      break;<br>                    }<br>            }<br><br>            var rule = new OpenLayers.Rule({<br>                        filter: new OpenLayers.Filter.Comparison(<br>                                {<br>                                 type: OpenLayers.Filter.Comparison.EQUAL_TO,<br>
                                     property: &quot;ark_id&quot;,<br>                                     value: &quot;CH05SR_536&quot;,}<br>                                )<br>                        });<br>           style.addRules(rule);<br>           return style;<br>        }        </pre></blockquote><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<pre id="line379">style_cxt_schm = getDefaultStyle(sld,&quot;cxt_schm&quot;);<br>var cxt_schm = new OpenLayers.Layer.WFS(cxt_schm,&#39;php/map/ark_wxs_server.php?TYPENAME=cxt_schm&#39;,{},<br>{styleMap: new OpenLayers.StyleMap({&quot;default&quot;:style_cxt_schm})});<br>
map.addLayers([cxt_schm]);</pre></blockquote>