| | |
| | | toolFlag: null, |
| | | colorAll: { |
| | | }, |
| | | menuTools(res) { |
| | | this.clearTools(); |
| | | topTools(res) { |
| | | this.clearTopTools(); |
| | | if (res.id == this.toolFlag) { |
| | | this.toolFlag = null; |
| | | return |
| | | } |
| | | this.toolFlag = res.id; |
| | | switch (res.id) { |
| | | case 'a2'://点漫游 |
| | |
| | | case 'b5'://垂直高度 |
| | | this.verticalHeight(); |
| | | break; |
| | | case 'd4'://土方量计算 |
| | | this.Volumetric(); |
| | | break; |
| | | case 'd5'://影像对比 |
| | | this.CurtainContrast(); |
| | | break; |
| | | case 'g1'://坐标定位 |
| | | this.Coordposition(); |
| | | break; |
| | | } |
| | | }, |
| | | leftTools(res) { |
| | | this.clearLeftTools() |
| | | switch (res.id) { |
| | | case 'l1': |
| | | break; |
| | | case 'l2': |
| | | break; |
| | | case 'l3'://在线制图 |
| | | this.setThematicMap(); |
| | | break; |
| | | case 'l4': |
| | | break; |
| | | case 'l5': |
| | | break; |
| | | case 'l6': |
| | | break; |
| | | } |
| | | }, |
| | | |
| | | //在线制图 |
| | | setThematicMap() { |
| | | // earthCtrl.coreMap.scene.mode = SmartEarth.Cesium.SceneMode.SCENE2D; |
| | | // var handle = new SmartEarth.Cesium.ScreenSpaceEventHandler(earthCtrl.viewer.scene.canvas); |
| | | |
| | | }, |
| | | |
| | | //坐标定位 |
| | | Coordposition() { |
| | | |
| | | }, |
| | | //影像对比 |
| | | CurtainContrast() { |
| | | this.toolMenu = earthCtrl.analysis.createCurtainContrast({ leftIndex: 0, rightIndex: 1 }) |
| | | }, |
| | | //土方量计算 |
| | | Volumetric() { |
| | | const Volumetric = earthCtrl.analysis.createVolumetricMeasure({}); |
| | | Volumetric.startDrawing(); |
| | | }, |
| | | //垂直高度 |
| | | verticalHeight() { |
| | | |
| | | earthCtrl.measure.measureHeight(function (e) { |
| | | }) |
| | | }, |
| | | //高程测量 |
| | | heightMeasure() { |
| | | |
| | | }, |
| | | //平面面积 |
| | | planeDistance() { |
| | | |
| | | earthCtrl.analysis.getPlaneArea(function (e) { |
| | | }) |
| | | }, |
| | | //表面距离 |
| | | surfaceDistance() { |
| | | |
| | | earthCtrl.measure.lineLength(function (e) { |
| | | }) |
| | | }, |
| | | //点漫游 |
| | | pointRoam() { |
| | |
| | | }, |
| | | |
| | | //清除方法 |
| | | clearTools() { |
| | | clearTopTools() { |
| | | if (this.toolFlag) { |
| | | switch (this.toolFlag) { |
| | | case 'a2': |
| | |
| | | case 'b5': |
| | | |
| | | break; |
| | | case 'd5': |
| | | debugger |
| | | this.toolMenu.removeFromMap() |
| | | break; |
| | | } |
| | | this.toolFlag = null; |
| | | // this.toolFlag = null; |
| | | this.toolMenu = null; |
| | | } |
| | | }, |
| | | clearLeftTools() { |
| | | |
| | | }, |
| | | |
| | | } |
| | | export default menuTool; |