Commit tschaub's patch for #447. This should let people who are having 'pink
tile' problems where right clicking returns the right tile not have problems anymore. Note that this is seperate from TileCache related issues where OpenLayers doesn't request tiles on a grid. Note that I have no reason why this should work. In fact, I'd say it *shouldn't* work, but other people are seeing this problem, so I'm glad to have the code in trunk, since it doesn't change teh default behavior. Thanks to Tim for the patch. git-svn-id: http://svn.openlayers.org/trunk/openlayers@2048 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -222,9 +222,14 @@ OpenLayers.Util.onImageLoad = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
OpenLayers.Util.onImageLoadErrorColor = "pink";
|
OpenLayers.Util.onImageLoadErrorColor = "pink";
|
||||||
|
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 0;
|
||||||
OpenLayers.Util.onImageLoadError = function() {
|
OpenLayers.Util.onImageLoadError = function() {
|
||||||
this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor;
|
this._attempts = (this._attempts) ? (this._attempts + 1) : 1;
|
||||||
|
if(this._attempts <= OpenLayers.IMAGE_RELOAD_ATTEMPTS) {
|
||||||
|
this.src = this.src;
|
||||||
|
} else {
|
||||||
|
this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor;
|
||||||
|
}
|
||||||
this.style.display = "";
|
this.style.display = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user