[OpenLayers-Users] Filtering a GeoJSON layer

Aparna aparna.mookerjee at gmail.com
Mon Dec 26 06:15:12 EST 2011


filtering either after projection or in the protocol->format->filter does
not seem to be working at all.

var state = new OpenLayers.Layer.Vector("State", {
                projection: map.displayProjection,
                filter: new OpenLayers.Filter.Comparison({
                type: OpenLayers.Filter.Comparison.EQUAL_TO,
                property: 'SCHMGT',
                value: 2
            }),
        strategies: [new OpenLayers.Strategy.Fixed()],
                protocol: new OpenLayers.Protocol.HTTP({
                    url:
"klm/GIS.json",
                    format: new OpenLayers.Format.GeoJSON({

                        extractAttributes: true

                    })
                })
            });

How does one implement a filter??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111226/1c3a9456/attachment.html


More information about the Users mailing list