<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16850" name=GENERATOR>

<DIV dir=ltr align=left><SPAN class=908365917-06072009><FONT face=Arial color=#0000ff size=2>That works!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=908365917-06072009><FONT face=Arial color=#0000ff size=2>Thanks,</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV align=left><FONT face="Poor Richard" size=2>Lak Krishnan</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Andreas Hocevar-2 (via Nabble) 
[mailto:<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3214550&i=0" target="_top" rel="nofollow">ml-user+68206-1629903874@...</a>] <BR><B>Sent:</B> Monday, July 
06, 2009 1:57 PM<BR><B>To:</B> Krishnan, Lakshmanan<BR><B>Subject:</B> Re: 
[OpenLayers-Users] Change filter on vector layer<BR></FONT><BR></DIV>
<DIV></DIV>Hi, <BR><BR>On Mon, Jul 6, 2009 at 6:58 PM, Lak <BR>Krishnan&lt;<A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=3214518&amp;i=0" target=_top rel="nofollow">lakshmanan.krishnan@...</A>&gt; wrote: <BR>&gt; 
<BR>&gt; That doesn't seem to work for me. <BR><BR>After setting your new 
filter, try <BR><BR>impactlocptlayer.refresh({force: true}); <BR><BR>instead. 
<BR><BR>Regards, <BR>Andreas. <BR>
<DIV class=shrinkable-quote><div class='shrinkable-quote'><BR>&gt; <BR>&gt; <BR>&gt; Andreas Hocevar-2 wrote: 
<BR>&gt;&gt; <BR>&gt;&gt; Hi, <BR>&gt;&gt; <BR>&gt;&gt; On Mon, Jul 6, 2009 at 
4:38 PM, Lak <BR>&gt;&gt; Krishnan&lt;<A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=3214518&amp;i=1" target=_top rel="nofollow">lakshmanan.krishnan@...</A>&gt; wrote: <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; I have a vector layer with a WFS protocol and filter as below 
<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; var impactlocptlayer = new 
OpenLayers.Layer.Vector("Editable Features", { <BR>&gt;&gt;&gt; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;strategies: [new <BR>&gt;&gt;&gt; OpenLayers.Strategy.BBOX(), 
saveStrategy], <BR>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;projection: new <BR>&gt;&gt;&gt; 
OpenLayers.Projection("EPSG:2264"), <BR>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;filter: new 
<BR>&gt;&gt;&gt; OpenLayers.Filter.Comparison({type: <BR>&gt;&gt;&gt; 
OpenLayers.Filter.Comparison.EQUAL_TO,property: 'eventid',value: 4}), 
<BR>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp;extractAttributes: false, <BR>&gt;&gt;&gt; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;protocol: new <BR>&gt;&gt;&gt; OpenLayers.Protocol.WFS({ <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; &nbsp;version: "1.1.0", <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; 
&nbsp;srsName: "EPSG:2264", <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; &nbsp;url: "<A href="http://localhost/geoserver/wfs" target=_top rel="nofollow">http://localhost/geoserver/wfs</A>", <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; &nbsp;featureNS : &nbsp;"<A href="http://postgis.org" target=_top rel="nofollow">http://postgis.org</A>", <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; &nbsp;featureType: "impactlocpt", <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; &nbsp;geometryName: "the_geom", <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; &nbsp;schema: <BR>&gt;&gt;&gt; "<A href="http://localhost/geoserver/wfs/DescribeFeatureType?version=1.1.0&amp;typename=uasidata:impactlocpt" target=_top rel="nofollow">http://localhost/geoserver/wfs/DescribeFeatureType?version=1.1.0&amp;typename=uasidata:impactlocpt</A>" 
<BR>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp;}), <BR>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;styleMap: wfsstyle 
<BR>&gt;&gt;&gt; }); <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; How do I change "Filter" 
later in my code? <BR>&gt;&gt; <BR>&gt;&gt; impactlocptlayer.filter = /* your 
new filter here */; <BR>&gt;&gt; impactlocptlayer.refresh(); <BR>&gt;&gt; 
<BR>&gt;&gt; Regards, <BR>&gt;&gt; Andreas. <BR>&gt;&gt; <BR>&gt;&gt; 
<BR>&gt;&gt; <BR>&gt;&gt; -- <BR>&gt;&gt; Andreas Hocevar <BR>&gt;&gt; OpenGeo - 
<A href="http://opengeo.org/" target=_top rel="nofollow">http://opengeo.org/</A><BR>&gt;&gt; Expert service straight from 
the developers. <BR>&gt;&gt; _______________________________________________ 
<BR>&gt;&gt; Users mailing list <BR>&gt;&gt; <A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=3214518&amp;i=2" target=_top rel="nofollow">Users@...</A> <BR>&gt;&gt; <A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>&gt;&gt; 
<BR>&gt;&gt; <BR>&gt; <BR>&gt; -- <BR>&gt; View this message in context: <A href="http://n2.nabble.com/Change-filter-on-vector-layer-tp3213371p3214112.html" target=_top rel="nofollow">http://n2.nabble.com/Change-filter-on-vector-layer-tp3213371p3214112.html</A><BR>&gt; 
Sent from the OpenLayers Users mailing list archive at Nabble.com. <BR>&gt; 
_______________________________________________ <BR>&gt; Users mailing list 
<BR>&gt; <A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=3214518&amp;i=3" target=_top rel="nofollow">Users@...</A> <BR>&gt; <A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>&gt; 
</DIV></div><BR><BR>-- <BR>Andreas Hocevar <BR>OpenGeo - <A href="http://opengeo.org/" target=_top rel="nofollow">http://opengeo.org/</A><BR>Expert service straight from the 
developers. <BR>_______________________________________________ <BR>Users 
mailing list <BR><A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=3214518&amp;i=4" target=_top rel="nofollow">Users@...</A> <BR><A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>

<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/Change-filter-on-vector-layer-tp3213371p3214550.html">RE: [OpenLayers-Users] Change filter on vector layer</a><br>
Sent from the <a href="http://n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>