Skip to main content
2 of 2
added 257 characters in body
Lazonaden
  • 165
  • 2
  • 11

How to get CQL_FILTER parameters from vector polygon

map projection is EPSG:900913, displayprojection for map EPSG:4326. vector layer is polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); with draw polygoon option

with following code I get CQL_FILTER

var myLatLonSquare = polygonLayer.features[0].geometry.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:4326"));

var testArray = "WITHIN(GEOM, ";

testArray = testArray + myLatLonSquare;

testArray = testArray.replace("MULTIPOLYGON(", "POLYGON");

antennaLayer.mergeNewParams({
    "CQL_FILTER": testArray
});

as it's shown on the images(the site does not let me to upload images yet) it gets different location coordinates. How to solve it?

UPDATED: enter image description here

enter image description here

enter image description here

Lazonaden
  • 165
  • 2
  • 11