Now it works. I had to make a global Variable as Mapmaker told. And then it's
importent that the <div id="map> is BEFORE the Script where I initialise
the map. I don't understand why but it works...
<body>
.
.
<div id="map"></div>
.
.
.
<script type="text/javascript">
var bounds = new OpenLayers.Bounds(
143, -44,
149, -39
);
var options = {
controls: [],
maxExtent: bounds,
maxResolution: 1.200597656250011,
projection: "EPSG:4326",
units: 'm',
};
var map = new OpenLayers.Map('map',options);
.
.
.
.
.
--
View this message in context:
http://n2.nabble.com/problem-with-map-setCenter-tp4779851p4780651.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users