<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Can anyone help with polygon layer projections?</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; ">I have the map projection set to EPSG:4326 (does not seem to make a difference whether it's 4326 or Google's 900913).</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent;
font-style: normal; ">I have loaded Google layers (OpenLayers.Layer.Google).</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; ">I have an empty polygon layer:</div><div style="background-color: transparent; "><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">var wgs84 = new OpenLayers.Projection("EPSG:4326");</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">var polygonLayer = new OpenLayers.Layer.Vector("New Polygon", {</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">projection: wgs84</font></div><div
style="background-color: transparent; "><font face="times new roman, new york, times, serif">});</font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; "><font face="times new roman, new york, times, serif"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; "><font face="times new roman, new york, times, serif">When I retrieve the vertices, they are in, I guess, Google's EPSG:900913 projection (mX,mY):</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif"><div style="background-color: transparent; ">var lastFeature = polygonLayer.features[polygonLayer.features.length-1];</div><div style="background-color: transparent; ">var lastGeom =
lastLayer.geometry.getVertices();</div><div style="background-color: transparent; "><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; ">Does anyone know how to have the layer vertices in EPSG:4326 format?</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; "><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; ">Thanks!</div></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; "><font face="times new roman, new york, times, serif"><br></font></div><div style="background-color: transparent; color:
rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; "><font face="times new roman, new york, times, serif"><br></font></div></div></div></body></html>