How to get terrain loading percentage

Hi,

Is there a way to find if the Terrain Data as finished loading or get a percentage that indicates the progress of the streaming of terrain.

The issue I'm facing is that I need to position 3D models on the ground, and move around according to user input, and while the Terrain Data is loading the Height values are all over the place. If I could find if the terrain was still loading I could delay positioning the models and prevent user input.

Thanks for the help.

Best,
André Santos

There is no public API for this at the moment.

That said, you can inspect the internals and examine the length of the tile load queue, which is an array. If the load queue is empty, then all data is loaded for the current camera view.

scene.globe._surface._tileLoadQueue

Note that this is implementation detail, and therefore subject to change at any point in the future, with no warning.

That will do for now. I will keep that in mind and check for changes in each update.

Thanks for the help.

Τη Τετάρτη, 29 Οκτωβρίου 2014 - 11:13:33 μ.μ. UTC+2, ο χρήστης andre....@inovmapping.com έγραψε:

That will do for now. I will keep that in mind and check for changes in each update.

Thanks for the help.

Any news on this? Do we have to dig into the internals still?

scene.globe._surface._tileLoadQueue has changed with cesium 1.28

Check out scene.globe.tileLoadProgressEvent:
http://cesiumjs.org/Cesium/Build/Documentation/Globe.html?classFilter=globe#tileLoadProgressEvent