diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index 50aef912d6..1fa9ba69ec 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -22,6 +22,11 @@ OpenLayers.Tile.Image.prototype = OpenLayers.Tile.prototype.initialize.apply(this, arguments); }, + destroy: function() { + this.layer.div.removeChild(this.img); + this.img = null; + }, + /** */ draw:function() { @@ -31,6 +36,7 @@ OpenLayers.Tile.Image.prototype = this.size, this.url, "absolute"); + this.layer.div.appendChild(this.img); }, /** @final @type String */