[OpenLayers-Users] Cartographic coordinates with Google Maps
Luís de Sousa
luis.a.de.sousa at gmail.com
Fri Jan 13 10:46:35 EST 2012
Dear all,
Bellow is the code of a simple map using a Google layer with the
MousePosition control. Even though I'm passing the 900913 projection for the
map projection and the map displayProjection properties the coordinates
shown in the MousePosition are Geodetical (lat,lon in degrees) instead of
Cartographic (x,y in meters). What am I missing?
Thank you,
Luís
function initMap(){
map = new OpenLayers.Map("myMap",{
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:900913"),
units: "m"
});
map.addControl(new OpenLayers.Control.MousePosition());
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
map.addLayers([gphy]);
}
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Cartographic-coordinates-with-Google-Maps-tp7184427p7184427.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list