1
let map = new Cesium.Viewer('map-3d');

const terrainProvider = new Cesium.CesiumTerrainProvider({
    url: 'http://59.48.1xxxx/xxx',
})

map.terrainProvider = terrainProvider

这是问题:

如何监听“terrainProvider”是否开始加载数据?

4

1 回答 1

1
viewer.scene.globe.tileLoadProgressEvent.addEventListener(function (queuedTileCount) {
    console.log(queuedTileCount);
    console.log(viewer.scene.globe.tilesLoaded);

    if(viewer.scene.globe.tilesLoaded){
        
    }
});
于 2021-06-08T07:35:04.353 回答