AW: [OpenLayers-Users] WMS-layer moved to the north
Arnd Wippermann
arnd.wippermann at web.de
Mon Jul 18 12:17:07 EDT 2011
Hi,
1. map creation without options will lead to projection EPSG:4326.
2. Google maps etc. can used with EPSG:4326, but data in EPSG:4326 will be
shifted.
Use the map options to set your map to spherical mercator (EPSG:900913).
var options = {
controls:[], //create map without controls -> add them later
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
numZoomLevels: 18,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
20037508, 20037508.34)
};
var map = new OpenLayers.Map('map', options);
By the way your layers looks very interesting.
Arnd
-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Dennis
Hesse BAW
Gesendet: Montag, 18. Juli 2011 15:30
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] WMS-layer moved to the north
Hi list,
I've got a strange problem.
I'm just starting with Openlayers, and try to add a WMS-layer to Openlayers
as an overlay.
When I open the map, which is located at zork66.de/openlayers/sostest.html,
both overlays are moved to the north a bit. What is strange to me is that
when I zoom in some steps the overlays fit to the OSM map and the Bing
sattelite image.
Can anyone help me with it?
Thanks
Dennis.
--
Dennis Hesse
Bundesanstalt für Wasserbau Dienststelle Hamburg Wedeler Landstraße 157
22559 Hamburg
Tel.: 040 81908-0 E-mail: baw at dennishesse.de
Webseiten: BAW || MDI-DE
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list