Remove images from dom when replacing them with cached images
This commit is contained in:
@@ -330,6 +330,9 @@ OpenLayers.TileManager = OpenLayers.Class({
|
||||
// only use image from cache if it is not on a layer already
|
||||
if (img && (!img.parentNode ||
|
||||
OpenLayers.Element.hasClass(img.parentNode, 'olBackBuffer'))) {
|
||||
if (tile.imgDiv) {
|
||||
tile.layer.div.removeChild(tile.imgDiv);
|
||||
}
|
||||
tile.imgDiv = img;
|
||||
OpenLayers.Util.removeItem(this.tileCacheIndex, tile.url);
|
||||
this.tileCacheIndex.push(tile.url);
|
||||
|
||||
Reference in New Issue
Block a user