[OpenLayers-Users] Change from OpenLayers.Layer.Google to OpenLayers.Layer.OSM
mail.roliveira at gmail.com
mail.roliveira at gmail.com
Tue May 28 04:49:58 PDT 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130528/85f42874/attachment.html>
More information about the Users
mailing list