使用方法简单:
在项目中引入Cesium.js
然后引入 cesium-measure.js 即可
let viewer = new Cesium.Viewer("viewerContainer") let measure = new Cesium.Measure(viewer) // 空间距离 measure.drawLineMeasureGraphics({ clampToGround: clampToGround, callback: () => { } }); // 空间面积 measure.drawAreaMeasureGraphics({ clampToGround: clampToGround, callback: () => { } }); // 三维量测 measure.drawTrianglesMeasureGraphics({ callback: () => { } }); // 清除 measure._drawLayer.entities.removeAll();更多用法详见:https://github.com/zhangti0708/cesium-measure
点击下载:cesium-measure测量插件