From 0e05cd22637fcd43e8332e034f66008a989d1909 Mon Sep 17 00:00:00 2001 From: Austin Hyde Date: Wed, 20 Nov 2013 15:35:01 -0500 Subject: [PATCH] If naturalWidth/Height properties aren't available, mimic them --- src/ol/imagetile.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ol/imagetile.js b/src/ol/imagetile.js index dd7098f00e..1fa5c9b866 100644 --- a/src/ol/imagetile.js +++ b/src/ol/imagetile.js @@ -115,6 +115,11 @@ ol.ImageTile.prototype.handleImageError_ = function() { * @private */ ol.ImageTile.prototype.handleImageLoad_ = function() { + if (!goog.isDef(this.image_.naturalWidth)) { + this.image_.naturalWidth = this.image_.width; + this.image_.naturalHeight = this.image_.height; + } + if (this.image_.naturalWidth && this.image_.naturalHeight) { this.state = ol.TileState.LOADED; } else {