handling of missing imagery?


Firstly, thanks for all the work on imagery layers!

I'm noticing a small issue when tiled imagery is missing e.g. through
a bad URL. You should be able to reproduce it with the attached patch
to the Imagery Layers.html example. For me (latest cesium on branch
master) it fails at CentralBodySurface.js:711 on parent.addReference()

Cannot call method 'addReference' of undefined

Am I correct in assuming there should be some handling of this case
within Cesium? Also, I'm wondering whether I need to support a
minimum level of detail value in a TMS imagery provider (CLA still in
the works, sorry for the delay) or whether this can also be handled by
a centralized failed tile load mechanism? e.g. If image tiles have
only been generated for levels 3->8


imagery_parent_problem.patch (1.12 KB)

Hi Chris,

You’re right that Cesium currently has a bug where it bombs if the root tiles of an imagery layer fail to load. I fixed the bug and created a pull request for the fix:


Regarding the minimum LOD, it was straightforward to add support for that, so I did so. Here’s the pull request:


However, Cesium currently only supports a limited number of imagery textures mapped to each terrain tile - 16 on most hardware. If you exceed that limit you’ll see texture mapping artifacts, and using a minimum level can easily result in too many textures when zoomed out. If you try it out, let me know how it goes.


Awesome! I've just been trying the bug fix which has been pulled into
master and it's working well. I'm not sure if I'll use the minimum
level support for the reason you mentioned and if possible make sure
the users generate down to zero level. It will be good to have it
there as an option though.