diff --git a/lib/OpenLayers/Layer/WMS/Untiled.js b/lib/OpenLayers/Layer/WMS/Untiled.js index 23e1cea2fd..056cd3254a 100644 --- a/lib/OpenLayers/Layer/WMS/Untiled.js +++ b/lib/OpenLayers/Layer/WMS/Untiled.js @@ -150,6 +150,11 @@ OpenLayers.Layer.WMS.Untiled.prototype = var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); var pos = this.map.getLayerPxFromLonLat(ul); + if ( this.tile && !this.tile.size.equals(tileSize)) { + this.tile.destroy(); + this.tile = null; + } + if (!this.tile) { this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, url, tileSize);