Treat image tiles with a zero dimension as empty
This commit is contained in:
@@ -104,7 +104,11 @@ ol.ImageTile.prototype.handleImageError_ = function() {
|
||||
* @private
|
||||
*/
|
||||
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.dispatchChangeEvent();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user