Skip to content
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

Merged
merged 6 commits into from
Jul 18, 2013

Conversation

ahocevar
Copy link
Contributor

No description provided.

@bartvde
Copy link
Contributor

bartvde commented Jul 18, 2013

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?

@ahocevar
Copy link
Contributor Author

@bartvde In this case, the source will be fully functional, but the layer that does not work will be removed.

@bartvde
Copy link
Contributor

bartvde commented Jul 18, 2013

in that case, please merge @ahocevar

@ahocevar
Copy link
Contributor Author

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.

@ahocevar
Copy link
Contributor Author

@bartvde, is this good to merge now?

@bartvde
Copy link
Contributor

bartvde commented Jul 18, 2013

sorry got side-tracked on something else, will have another look now

scope: this
});
this.lazy = lazy;
this.fireEvent("ready", this);
Copy link
Contributor

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) {
Copy link
Contributor

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

@bartvde
Copy link
Contributor

bartvde commented Jul 18, 2013

LGTM

ahocevar added a commit that referenced this pull request Jul 18, 2013
Instead of pinging a lazy source, try it and remove layers if it fails
@ahocevar ahocevar merged commit df41c90 into planetfederal:master Jul 18, 2013
@ahocevar ahocevar deleted the lazy-no-ping branch July 18, 2013 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants