[OpenLayers-Users] Filter Geojson

adityakumar529 adityakumar529 at gmail.com
Fri Jun 12 14:15:57 PDT 2015


Hi Users,
  I have a JSON layer with me.
I have called the layer from an external source.
layer1 = new OpenLayers.Layer.Vector("GeoJSON", {
  'internalProjection': new OpenLayers.Projection("EPSG:3857"),
                'externalProjection': new
OpenLayers.Projection("EPSG:4326"),
            strategies: [new OpenLayers.Strategy.Fixed()],
            protocol: new OpenLayers.Protocol.HTTP({
                url: "http://localhost/ol/point.geojson",
                format: new OpenLayers.Format.GeoJSON()
            }),

Now on this layer I want to perform filter on unit_name attribute
My data is like this

{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name":
"urn:ogc:def:crs:OGC:1.3:CRS84" } },
                                                                                
"features": [
{ "type": "Feature", "properties": { "gid": 1, "unit_name": "abc", "state":
"abc", "district": "xyz", "latitude": 34.828290, "longitude": 23.805890 },
"geometry": { "type": "Point", "coordinates": [ 34.8059, 23.8283 ] } },


Thanks
Aditya Kumar



-----
GIS Developer

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Filter-Geojson-tp5210723.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list