Allow tiles in ol.ImageState.ERROR state to be loaded.
This commit is contained in:
+5
-2
@@ -122,10 +122,13 @@ ol.Image.prototype.handleImageLoad_ = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load not yet loaded URI.
|
* Load the image or retry if loading previously failed.
|
||||||
|
* Loading is taken care of by the tile queue, and calling this method is
|
||||||
|
* only needed for preloading or for reloading in case of an error.
|
||||||
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.Image.prototype.load = function() {
|
ol.Image.prototype.load = function() {
|
||||||
if (this.state == ol.ImageState.IDLE) {
|
if (this.state == ol.ImageState.IDLE || this.state == ol.ImageState.ERROR) {
|
||||||
this.state = ol.ImageState.LOADING;
|
this.state = ol.ImageState.LOADING;
|
||||||
this.changed();
|
this.changed();
|
||||||
goog.asserts.assert(!this.imageListenerKeys_,
|
goog.asserts.assert(!this.imageListenerKeys_,
|
||||||
|
|||||||
+5
-2
@@ -137,10 +137,13 @@ ol.ImageTile.prototype.handleImageLoad_ = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load not yet loaded URI.
|
* Load the image or retry if loading previously failed.
|
||||||
|
* Loading is taken care of by the tile queue, and calling this method is
|
||||||
|
* only needed for preloading or for reloading in case of an error.
|
||||||
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.ImageTile.prototype.load = function() {
|
ol.ImageTile.prototype.load = function() {
|
||||||
if (this.state == ol.TileState.IDLE) {
|
if (this.state == ol.TileState.IDLE || this.state == ol.TileState.ERROR) {
|
||||||
this.state = ol.TileState.LOADING;
|
this.state = ol.TileState.LOADING;
|
||||||
this.changed();
|
this.changed();
|
||||||
goog.asserts.assert(!this.imageListenerKeys_,
|
goog.asserts.assert(!this.imageListenerKeys_,
|
||||||
|
|||||||
+4
-1
@@ -107,6 +107,9 @@ ol.Tile.prototype.getState = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FIXME empty description for jsdoc
|
* Load the image or retry if loading previously failed.
|
||||||
|
* Loading is taken care of by the tile queue, and calling this method is
|
||||||
|
* only needed for preloading or for reloading in case of an error.
|
||||||
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.Tile.prototype.load = goog.abstractMethod;
|
ol.Tile.prototype.load = goog.abstractMethod;
|
||||||
|
|||||||
Reference in New Issue
Block a user