[OpenLayers-Dev] matchCase in openlayers.filter does not work for case-insensitive

tsk tanzilk at gmail.com
Wed Apr 17 05:32:19 PDT 2013


Hi,

I have added this code to make an attribute search on a wfs layer, but has
to be case-insensitive.

  Filter features with the query.
             var statesLayer = new OpenLayers.Layer.Vector("STATE", {
                 protocol: new OpenLayers.Protocol.WFS({

                 url: "http://localhost:8080/geoserver/wfs",
                   featureType: "STATE",
                  featureNS: "http://localhost:8080/geoserver/abc"
                  }),
                  strategies: [new OpenLayers.Strategy.BBOX()],
            filter: new OpenLayers.Filter.Logical({
                    type: OpenLayers.Filter.Logical.AND,
                       filters: [new OpenLayers.Filter.Comparison({
                       type: OpenLayers.Filter.Comparison.EQUAL_TO,
                   matchCase: false,
                   property: "NAME",
                       value: "abc"
                         
                     })]
                   })
             });
               map.addLayer(statesLayer);



Please if anybody could say where am I wrong or provide sample code to carry
out a simple *CASE-INSENSITIVE *attribute search over shapefiles published
in geoserver.
Thanks in advance.
             



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/matchCase-in-openlayers-filter-does-not-work-for-case-insensitive-tp5047621.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list