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

Don't use an ancestor tile if it needs to be reprojected and hasn't been #4811

Merged
merged 6 commits into from
Jan 5, 2017

Conversation

kring
Copy link
Member

@kring kring commented Jan 5, 2017

Fixes #4777

Here's what happens to trigger the exception:

  • We zoom in close to the globe and near the pole, so that we're exceeding the maximum level available from the imagery provider.
  • One terrain tile, T1, loads an imagery tile I1. T1 doesn't cross the web mercator boundary, so reprojection of I1 is unnecessary. I1 eventually enters the READY state without being reprojected.
  • Another terrain tile, T2, finds that an imagery tile it would like to use is not available (missing, max level exceeded, etc.). It walks up the parent chain from that tile until it finds I1. I1 is ready so it selects it for rendering. But T2 does cross the web mercator boundary, so I1 must be reprojected before it can be used.
  • We try to render T2 with I1, but I1 isn't really ready for use by T2, so we get the "readyImagery is not actually ready" exception.

The fix is, when walking up the parent chain looking for a usable tile, to make sure that the candidate imagery tile is not only ready but that it also has been reprojected if this terrain tile needs it to be.

@@ -0,0 +1,66 @@
/*global defineSuite*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please adjust the tab spacing in this file to match the rest of Cesium?

Copy link
Member Author

@kring kring Jan 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry, done. I also opened #4813 which will prevent this from happening in the future.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 5, 2017

Thanks for the fix, @kring!

@svetoslav80 can you confirm that this works for you?

@svetoslav80
Copy link

Seems that it's working fine now. Thanks for fixing.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 5, 2017

Thanks for the quick response, @svetoslav80! It is much appreciated.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 5, 2017

Thanks again @kring @svetoslav80!

@pjcozzi pjcozzi merged commit c0dd574 into master Jan 5, 2017
@pjcozzi pjcozzi deleted the maybeFixWebMercatorException branch January 5, 2017 23:12
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.

readyImagery is not actually ready
3 participants