fix for #480 -- addition of 'viewRequestID' variable to map to keep track of the changing view requests so that images dont load when they are no longer needed. muchas gracias to senior woodall for his help getting this patch together

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2231 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-02-16 20:24:56 +00:00
parent 8095e22600
commit 3309b0b12e
4 changed files with 47 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ OpenLayers.Tile.Image.prototype =
destroy: function() {
if ((this.imgDiv != null) && (this.imgDiv.parentNode == this.layer.div)) {
this.layer.div.removeChild(this.imgDiv);
this.imgDiv.map = null;
}
this.imgDiv = null;
OpenLayers.Tile.prototype.destroy.apply(this, arguments);
@@ -52,6 +53,8 @@ OpenLayers.Tile.Image.prototype =
if (this.imgDiv == null) {
this.initImgDiv();
}
this.imgDiv.viewRequestID = this.layer.map.viewRequestID;
this.url = this.layer.getURL(this.bounds);
@@ -132,6 +135,10 @@ OpenLayers.Tile.Image.prototype =
null, null, null,
this.layer.opacity);
}
// we need this reference to check back the viewRequestID
this.imgDiv.map = this.layer.map;
},
/**