Change Projection in OpenLayers Map
Posted
by deamon
on Stack Overflow
See other posts from Stack Overflow
or by deamon
Published on 2010-04-20T09:31:41Z
Indexed on
2010/04/21
22:13 UTC
Read the original article
Hit count: 340
I want to set "EPSG:4326" as the projection of an OpenLayers map, but when I try it, I always get "EPSG:900913".
function init() {
var options = {
projection: new OpenLayers.Projection("EPSG:4326") // ignored
};
map = new OpenLayers.Map('map', options);
var layer = new OpenLayers.Layer.OSM.Osmarender("Osmarender");
map.addLayer(layer);
...
alert(map.getProjection()); // returns "EPSG:900913"
...
}
How can I set the Projection to EPSG:4326?
© Stack Overflow or respective owner