I have added vector layer to map:
vactorTest = new OpenLayers.Layer.Vector("Editable Features", {
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
projection: new OpenLayers.Projection("EPSG:900913"),
protocol: new OpenLayers.Protocol.WFS({
srsName: "EPSG:900913",
url: "http://localhost:8080/geoserver/wfs",
featureType: "ROADS",
featureNS: "http://localhost:8080/MIA",
featurePrefix: "MIA",
geometryName: "GEOM",
version: "1.1.0"
})
});
map.addLayer(vactorTest);
And then, added polygon draw control:
var drawPolygon = new OpenLayers.Control.DrawFeature(
vactorTest, OpenLayers.Handler.Polygon,
{
title: "Draw Polygon",
displayClass: "olControlDrawFeaturePolygon",
multi: true
}
);
with drawn polygon I want to filter layer:
testLayer.mergeNewParams({
"CQL_FILTER": mergeFilter
});
I use within filter:
WITHIN(GEOM, POLYGON((4693721.49445 672633.89194, 4560244.10812 322255.75282, 4703732.29843 422363.79257, 4693721.49445 672633.89194)))
target layer is in Georgia, and if I draw polygon near Italy then, filter works.
How can I change vector projection like my layer to get right result?