diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 95ee9157e5..4dd3e3a90a 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -250,6 +250,12 @@ OpenLayers.Map.prototype = { this.events.triggerEvent("addlayer"); + //make sure layer draws itself! + if (this.center != null) { + var bounds = this.getExtent(); + layer.moveTo(bounds, true); + } + // hack hack hack - until we add a more robust layer switcher, // which is able to determine which layers are base layers and // which are not (and put baselayers in a radiobutton group and