Treat image tiles with a zero dimension as empty
This commit is contained in:
+5
-1
@@ -104,7 +104,11 @@ ol.ImageTile.prototype.handleImageError_ = function() {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.ImageTile.prototype.handleImageLoad_ = function() {
|
ol.ImageTile.prototype.handleImageLoad_ = function() {
|
||||||
this.state = ol.TileState.LOADED;
|
if (this.image_.naturalWidth && this.image_.naturalHeight) {
|
||||||
|
this.state = ol.TileState.LOADED;
|
||||||
|
} else {
|
||||||
|
this.state = ol.TileState.EMPTY;
|
||||||
|
}
|
||||||
this.unlistenImage_();
|
this.unlistenImage_();
|
||||||
this.dispatchChangeEvent();
|
this.dispatchChangeEvent();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user