Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

For OSM and similar maps, the map.projection has to be

projection: new OpenLayers.Projection("EPSG:900913"),

or EPSG:3857 if you prefer.

Just changing the code number to 4326 does not reproject the tiles automatically, but places them into a wrong part of the world. Since Opnelayers can not perform the reprojection on its own, you have to follow the hints given at OpenLayers doesn't show an overlay with a different SRS than the base layerOpenLayers doesn't show an overlay with a different SRS than the base layer

For OSM and similar maps, the map.projection has to be

projection: new OpenLayers.Projection("EPSG:900913"),

or EPSG:3857 if you prefer.

Just changing the code number to 4326 does not reproject the tiles automatically, but places them into a wrong part of the world. Since Opnelayers can not perform the reprojection on its own, you have to follow the hints given at OpenLayers doesn't show an overlay with a different SRS than the base layer

For OSM and similar maps, the map.projection has to be

projection: new OpenLayers.Projection("EPSG:900913"),

or EPSG:3857 if you prefer.

Just changing the code number to 4326 does not reproject the tiles automatically, but places them into a wrong part of the world. Since Opnelayers can not perform the reprojection on its own, you have to follow the hints given at OpenLayers doesn't show an overlay with a different SRS than the base layer

Source Link
AndreJ
  • 77.1k
  • 5
  • 88
  • 163

For OSM and similar maps, the map.projection has to be

projection: new OpenLayers.Projection("EPSG:900913"),

or EPSG:3857 if you prefer.

Just changing the code number to 4326 does not reproject the tiles automatically, but places them into a wrong part of the world. Since Opnelayers can not perform the reprojection on its own, you have to follow the hints given at OpenLayers doesn't show an overlay with a different SRS than the base layer