<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
when i'm trying to set the center and zoom-level via the
setCenter-method, i get back an image of the whole world. I have no
idea, why it doesn't apply the setting.<br>
The strange thing is, i can see the right extent for a short time, but
before rendering is finished, it changes to the whole world and stays
like this.<br>
What am i missing?<br>
<br>
Here is my code for the map-creation:<br>
<br>
<font face="Courier New, Courier, monospace">var createMap =
function(overlay, opacity){<br>
<br>
var center = new OpenLayers.LonLat(844774, 6033921);<br>
<br>
var options = {<br>
projection: new OpenLayers.Projection("EPSG:900913"),<br>
displayProjection: new OpenLayers.Projection("EPSG:900913"),<br>
units: "m",<br>
numZoomLevels: 25,<br>
maxResolution: 156543.0339,<br>
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,<br>
20037508, 20037508.34),<br>
controls: [new OpenLayers.Control.PanZoomBar(), new
OpenLayers.Control.MousePosition()]<br>
};<br>
<br>
var map = new OpenLayers.Map(options);<br>
<br>
var google = new OpenLayers.Layer.Google(<br>
"Google",<br>
{'sphericalMercator': true}<br>
);<br>
<br>
var OSM = new OpenLayers.Layer.OSM("OSM");<br>
<br>
var google_t = new OpenLayers.Layer.Google(<br>
"Google_Terrain",<br>
{type: G_PHYSICAL_MAP, 'sphericalMercator': true}<br>
);<br>
<br>
map.addLayers([OSM, google_t, google]);<br>
<br>
google.setOpacity(opacity);<br>
google_t.setOpacity(opacity);<br>
OSM.setOpacity(opacity);<br>
<br>
map.setCenter(center, 15);<br>
<br>
if (overlay){<br>
map.addLayer(overlay);<br>
}<br>
<br>
<br>
return map;<br>
<br>
};<br>
<br>
<br>
</font>Thanks for any help<br>
Dirk.<br>
</body>
</html>