[OpenLayers-Users] Change filter on vector layer
Lak Krishnan
lakshmanan.krishnan at mecklenburgcountync.gov
Mon Jul 6 12:58:04 EDT 2009
That doesn't seem to work for me.
Andreas Hocevar-2 wrote:
>
> Hi,
>
> On Mon, Jul 6, 2009 at 4:38 PM, Lak
> Krishnan<lakshmanan.krishnan at mecklenburgcountync.gov> 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&typename=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 openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/Change-filter-on-vector-layer-tp3213371p3214112.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list