diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 2b824ef1b2..d264226cd3 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -595,13 +595,14 @@ OpenLayers.Map.prototype = { this.size = oldSize = newSize; if (!newSize.equals(oldSize)) { + // store the new size + this.size = newSize; + //notify layers of mapresize for(var i=0; i < this.layers.length; i++) { this.layers[i].onMapResize(); } - // store the new size - this.size = newSize; // the div might have moved on the page, also this.events.element.offsets = null;