[OpenLayers-Users] Change filter on vector layer
Lak Krishnan
lakshmanan.krishnan at mecklenburgcountync.gov
Mon Jul 6 14:00:09 EDT 2009
That works!
Thanks,
Lak Krishnan
________________________________
From: Andreas Hocevar-2 (via Nabble)
[mailto:ml-user+68206-1629903874 at n2.nabble.com]
Sent: Monday, July 06, 2009 1:57 PM
To: Krishnan, Lakshmanan
Subject: Re: [OpenLayers-Users] Change filter on vector layer
Hi,
On Mon, Jul 6, 2009 at 6:58 PM, Lak
Krishnan<lakshmanan.krishnan at ...
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3214518&i=0> >
wrote:
>
> That doesn't seem to work for me.
After setting your new filter, try
impactlocptlayer.refresh({force: true});
instead.
Regards,
Andreas.
>
>
> Andreas Hocevar-2 wrote:
>>
>> Hi,
>>
>> On Mon, Jul 6, 2009 at 4:38 PM, Lak
>> Krishnan<lakshmanan.krishnan at ...
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3214518&i=1> >
wrote:
>>>
>>> I have a vector layer with a WFS protocol and filter as below
>>>
>>> var impactlocptlayer = new OpenLayers.Layer.Vector("Editable
Features", {
>>> strategies: [new
>>> OpenLayers.Strategy.BBOX(), saveStrategy],
>>> projection: new
>>> OpenLayers.Projection("EPSG:2264"),
>>> filter: new
>>> OpenLayers.Filter.Comparison({type:
>>> OpenLayers.Filter.Comparison.EQUAL_TO,property: 'eventid',value:
4}),
>>> extractAttributes:
false,
>>> protocol: new
>>> OpenLayers.Protocol.WFS({
>>>
>>> version: "1.1.0",
>>>
>>> srsName: "EPSG:2264",
>>>
>>> url: "http://localhost/geoserver/wfs",
>>>
>>> featureNS : "http://postgis.org",
>>>
>>> featureType: "impactlocpt",
>>>
>>> geometryName: "the_geom",
>>>
>>> schema:
>>>
"http://localhost/geoserver/wfs/DescribeFeatureType?version=1.1.0&typena
me=uasidata:impactlocpt"
>>> }),
>>> styleMap: wfsstyle
>>> });
>>>
>>> How do I change "Filter" later in my code?
>>
>> impactlocptlayer.filter = /* your new filter here */;
>> impactlocptlayer.refresh();
>>
>> Regards,
>> Andreas.
>>
>>
>>
>> --
>> Andreas Hocevar
>> OpenGeo - http://opengeo.org/
>> Expert service straight from the developers.
>> _______________________________________________
>> Users mailing list
>> Users at ...
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3214518&i=2>
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
> --
> View this message in context:
http://n2.nabble.com/Change-filter-on-vector-layer-tp3213371p3214112.htm
l
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at ...
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3214518&i=3>
> http://openlayers.org/mailman/listinfo/users
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
Users at ...
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3214518&i=4>
http://openlayers.org/mailman/listinfo/users
________________________________
View message @
http://n2.nabble.com/Change-filter-on-vector-layer-tp3213371p3214518.htm
l
To unsubscribe from Re: Change filter on vector layer, click here
< (link removed)
rcmlzaG5hbkBtZWNrbGVuYnVyZ2NvdW50eW5jLmdvdnwzMjE0MTEyfC00Nzg5NDQ1MDY=> .
--
View this message in context: http://n2.nabble.com/Change-filter-on-vector-layer-tp3213371p3214550.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090706/62328029/attachment.html
More information about the Users
mailing list