I am using openLayers and creating a OSM base layer. By default the layer use EPSG:900913 and the coordinates are in meters. I want to use coordinates in degrees with EPSG:4326 so I initilize layer with:
base_layer.addOptions({ sphericalMercator: true,
projection: new OpenLayers.Projection('EPSG:4326')}, true);
Now the map uses degrees but have the next problem: The point with latitude 37.296 and longitude -5.929 (http://www.openstreetmap.org/?lat=37.296&lon=-5.929&zoom=12&layers=Q# and the same coordinates in Google Maps) appears to me (moving map and executing map.getCenter()
in firebug) in lat. -49.75, lon. -5.929.
Why? How can I use an OSM layer with same degrees coordinates as in openstreetmap.org
and as are returned by nominatim.openstreetmap.org
?