I had a graphical issue on my website using Cesium : on the scenery first load often (but not always!) some black holes remain in my terrain, as some tiles have not been loaded correctly.
The strange thing is also that refreshing the page (pressing F5)… the scenery is always well loaded.
From that moment every time I reaload the scenery, also closing the browser before, this will be load correctly : only on very first load the problem is present.
It’s obvious that on the first time something have to be loaded from the server and on the second time it is already on the browser cache, in fact deleting the browser cache the issue come back!
I use Chrome browser on Win 7 PC and initialize the Cesium Viewer in this way :
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
I can indeed replicate this. This looks like it might be related to this issue on GitHub (and I bumped the issue with this report). It arises from setting the terrain provider right after creating the viewer. The recommended workaround for this would be to set the terrain provider in the options when you create the viewer.
I tried to make a modification to my code creating before the Terrain Provider and then assigning it in the options of the Viewer, but I see no differences unfortunately.
It seems to work! Thank you Sean, very appreciated help!!
But… it is unbelievable : just two lines of code to fix such a terrible bug, how is it possible they are still not integrated in Cesium official version? What can be the cons in using this code?
P.S. I tried to make the modification also in the minified Cesium version , but with no success, really I can’t understand the minified Javascript syntax. However, no problem, I can use the unminified one.