-
Notifications
You must be signed in to change notification settings - Fork 97
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
Instead of pinging a lazy source, try it and remove layers if it fails #204
Conversation
hey @ahocevar code-wise this look good to me, to clarify, what will happen if someone has 1 lazy source with 2 layers, where one of them works and the other one doesn't? |
@bartvde In this case, the source will be fully functional, but the layer that does not work will be removed. |
in that case, please merge @ahocevar |
I see that there are still things wrong: 503 errors don't always make the layer go away, and the source still shows up in the Add Layers dialog. Needs a bit more work, and will ask you for another quick review when done @bartvde. |
@bartvde, is this good to merge now? |
sorry got side-tracked on something else, will have another look now |
scope: this | ||
}); | ||
this.lazy = lazy; | ||
this.fireEvent("ready", this); |
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.
any specific reason why ready is fired but this.ready is not set to true here?
'loadend': this.removeDeadLayer, | ||
scope: this | ||
}); | ||
if (evt.object.metadata._alive === 0) { |
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.
just thinking out loud here, but can't '_alive' get into negative values if all tiles fail to load?
Sorry, not thinking straight here, tileloaded and tileerror will always happen together, so 0 is right
LGTM |
Instead of pinging a lazy source, try it and remove layers if it fails
No description provided.