根据网络现有的方法,加以整理即可获得
主要利用 tileLoadProgressEvent 方法
// 获取地图加载进度
getProgress() {
var helper = new Cesium.EventHelper();
let max = 0, progress = 0
helper.add(viewer.scene.globe.tileLoadProgressEvent, function (e) {
max = Math.max(max,e)
progress = Math.round(100 *(max-e)/max)
if (e == 0) {
progress = 100
}
})
},
本文介绍了如何使用Cesium库中的tileLoadProgressEvent方法来监控地图加载进度,通过Cesium.EventHelper实现动态获取并更新地图加载的百分比。
4732

被折叠的 条评论
为什么被折叠?



