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

>>cesium 求地表两点的距离(基础篇):https://www.jianshu.com/p/0442003aa59b

原文地址:https://www.cnblogs.com/2008nmj/p/15587544.html