[OpenLayers-Users] Polygon Layer Projection
uk52rob
uk52rob at yahoo.co.uk
Fri Oct 12 06:44:40 PDT 2012
Can anyone help with polygon layer projections?
I have the map projection set to EPSG:4326 (does not seem to make a difference whether it's 4326 or Google's 900913).
I have loaded Google layers (OpenLayers.Layer.Google).
I have an empty polygon layer:
var wgs84 = new OpenLayers.Projection("EPSG:4326");
var polygonLayer = new OpenLayers.Layer.Vector("New Polygon", {
projection: wgs84
});
When I retrieve the vertices, they are in, I guess, Google's EPSG:900913 projection (mX,mY):
var lastFeature = polygonLayer.features[polygonLayer.features.length-1];
var lastGeom = lastLayer.geometry.getVertices();
Does anyone know how to have the layer vertices in EPSG:4326 format?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121012/6db0bf99/attachment-0001.html>
More information about the Users
mailing list