[OpenLayers-Users] Filter is not working ?

Mustafa646 noorcs22 at gmail.com
Tue Mar 8 12:44:01 EST 2011


Here is the code below, I am trying to filter the features and want to
display over Google Map, But it could not display. Amazing thing is when i
remove filter, it works fine i.e all the features are displayed over google
map.

  wfs = new OpenLayers.Layer.Vector("States", {
                strategies: [new OpenLayers.Strategy.BBOX()],
                protocol: new OpenLayers.Protocol.WFS({
                    url: "http://localhost:8080/geoserver/wfs",
                    featureType: "traget_grave3",
                    featureNS: "http://www.openplans.org/TestSpace",
                    srsName: "EPSG:900913",
                    version: "1.1.0",
                    extractAttributes: true,
                    isBaseLayer: false,
                    visibility: true
                }),

                filter: new OpenLayers.Filter.Logical({
                    type: OpenLayers.Filter.Logical.OR,
                    filters:
                [
                new OpenLayers.Filter.Comparison({
                    type: OpenLayers.Filter.Comparison.EQUAL_TO,
                    property: " GRAV_ID ",
                    value: "3 A 1"
                }),
                new OpenLayers.Filter.Comparison({
                    type: OpenLayers.Filter.Comparison.EQUAL_TO,
                    property: " GRAV_ID ",
                    value: "3 B 2"
                })
                ]
                }) 

Any idea , why this is happening... Without using filter, it works fine but
with filter, it does't work.

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Filter-is-not-working-tp6132078p6132078.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list