Finally, was able to filter the vector layer,. The biggest problem was to use multiple values and/or multiple filter options and could not create permulation combination of OGC filters(logical, comparison, ..). This seemed rather difficult at first. Eventually created CQL filters<br>
which were converted. This is the layer<br><br>var state = new OpenLayers.Layer.Vector("Karnataka", {<br> strategies: [new OpenLayers.Strategy.BBOX()],<br> filter:"",<br> protocol: new OpenLayers.Protocol.WFS({<br>
version: "1.1.0",<br> url: "<a href="http://localhost:8085/geoserver/wfs">http://localhost:8085/geoserver/wfs</a>", <br> featureType: "karf",<br>
featureNS: "<a href="http://opengeo.org/India">http://opengeo.org/India</a>"<br> <br> }),<br> <br> <br> });<br><br>
and then logical OR or Logical AND was wrapped with comparison Filters and converted to OGC. <br><br><br><div class="gmail_quote">On Wed, Jan 4, 2012 at 2:03 PM, aparna <span dir="ltr"><<a href="mailto:aparna.mookerjee@gmail.com">aparna.mookerjee@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Christoph,<br>
<br>
OGC filter is working with the vector layer (WFS, didnot work with the<br>
geojson). Though with more complex filter combinations one has to convert to<br>
CQL and then refresh the map.<br>
<br>
layer.refresh({force:true});<br>
<br>
was needed. Thanks to all for your help.<br>
<br>
Aparna<br>
<br></blockquote></div><br>