Hi Arnd, Ok, seems clear, but why then is it ok when zooming in? Does the projection change on higher zoom levels, or is the difference just to small to see the error?
If you want to see more of these layers, they will be online sometime in the future at www.mdi-de.org, but it can last for some months, were just starting ;-) Dennis. 2011/7/18 Arnd Wippermann <[email protected]>: > 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: [email protected] > [mailto:[email protected]] Im Auftrag von Dennis > Hesse BAW > Gesendet: Montag, 18. Juli 2011 15:30 > An: [email protected] > 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: [email protected] > Webseiten: BAW || MDI-DE > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > -- Dennis Hesse Bundesanstalt für Wasserbau Dienststelle Hamburg Wedeler Landstraße 157 22559 Hamburg Tel.: 040 81908-0 E-mail: [email protected] Webseiten: BAW || MDI-DE _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
