New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load erroneous image in ol.Image#load and ol.ImageTile#load #5270
Conversation
5b227eb
to
c488fab
Compare
@@ -122,10 +122,11 @@ ol.Image.prototype.handleImageLoad_ = function() { | |||
|
|||
|
|||
/** | |||
* Load not yet loaded URI. | |||
* Load not yet loaded or erroneous image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Load the image or retry if loading previously failed.
would make for clearer docs. Loading an "erroneous" image makes it sound like the intent is to load the wrong image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion; I will change
Ready to be reviewed, thanks |
@fredj Will this load ad-infinitum when e.g. connection to internet breaks? |
@gjn no, this only expose the load function and allow error tiles/images to be loaded again |
I may be missing something, but to me this looks indeed like error tiles will be retried over and over. |
This needs to be checked but ol3 doesn't retry to load tiles on error. |
You are right @fredj: https://github.com/openlayers/ol3/blob/v3.16.0/src/ol/tilequeue.js#L115-120 and https://github.com/openlayers/ol3/blob/v3.16.0/src/ol/reproj/tile.js#L321-L323 only call That said, this is good to merge. |
@@ -122,10 +122,11 @@ ol.Image.prototype.handleImageLoad_ = function() { | |||
|
|||
|
|||
/** | |||
* Load not yet loaded URI. | |||
* Load the image or retry if loading previously failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a note that 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note added
Thanks for the review |
Allow tiles in
ol.ImageState.ERROR
state to be loaded.To be able to reload erroneous tiles.
Fixes #4338