cesium之measure功能实现
初始化:
//工具-图上量算初始化 initMeasure(){ this.measure = new globe.analysi.Measure({ viewer: window.viewer }) this.measure.on( globe.analysi.Measure.event.change, (e) => { }); this.measure.on( globe.analysi.Measure.event.start, (e) => {//开始分析前回调(异步) this.loading = this.$loading({ lock: true, text: '数据加紧量算中,请稍等...', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' }); setTimeout(() => { this.loading.close(); }, 10000); }); this.measure.on( globe.analysi.Measure.event.end, (e) => {//分析完成后回调(异步) this.loading && this.loading.close() if (e.mtype == "section") { //剖面 this.EchartsVisible = true this.setEchartOptions(e) } }); }
参考1:https://www.jianshu.com/p/1766679c3ebe(Cesium开发工具篇 | 04量测工具与调试面板)
https://github.com/zhangti0708/cesium-measure