Ok, my distraction:
new OpenLayers.Layer.OSM("osm", {projection: new
OpenLayers.Projection('EPSG:4326')})
Should be
new OpenLayers.Layer.OSM("osm", "", {projection: new
OpenLayers.Projection('EPSG:4326')})
Sent from Alto - altomail.com
From: [email protected]<[email protected]>
To: <[email protected]>
Sent: Tuesday, May 28, 2013
Subject: Change from OpenLayers.Layer.Google to OpenLayers.Layer.OSM
I'm confused about EPSGs used by Google's layer and OSM layer.
My project has geoserver serving layers in EPSG:4326 projection.
When I create a google layer:
var gmap = new OpenLayers.Layer.Google("Google Streets",
{numZoomLevels: 20})
;EPSG is 4326,
and units are in degrees.
So I have no problem when requesting a WMS layer and data is placed correctly.
However, if I switch to OSM layer:
var osm = new OpenLayers.Layer.OSM("osm", {projection: new
OpenLayers.Projection('EPSG:4326')})
;EPSG is 900913,
and units are in meters.
My questions:
- Why is OSM layer projection EPSG:900913?
- Can I have a OSM baseLayer in a different projection? The {projection: new
OpenLayers.Projection('EPSG:4326')} argument seemed to have no effect on the
layer.
Thanks in advance,
Ruben
Sent from Alto - altomail.com_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users