月球大数据地理空间分析展示平台-【前端】-月球2期前端
WX
2023-06-09 eff42e5897b5f0935aa5b93c1bd9acb8bb39b8f0
src/assets/js/Map/menuTool.js
@@ -1,60 +1,59 @@
const menuTool = {
    toolMenu: null,
    toolFlag: null,
    colorAll: {
    },
  colorAll: {},
    topTools(res) {
        this.clearTopTools();
        if (res.id == this.toolFlag) {
            this.toolFlag = null;
            return
      return;
        }
        this.toolFlag = res.id;
        switch (res.id) {
            case 'a2'://点漫游
      case "a2": //点漫游
                this.pointRoam();
                break;
            case 'a3'://线漫游
      case "a3": //线漫游
                this.lineRoam();
                break;
            case 'b2'://表面距离
      case "b2": //表面距离
                this.surfaceDistance();
                break;
            case 'b3'://平面面积
      case "b3": //平面面积
                this.planeDistance();
                break;
            case 'b4'://高程测量
      case "b4": //高程测量
                this.heightMeasure();
                break;
            case 'b5'://垂直高度
      case "b5": //垂直高度
                this.verticalHeight();
                break;
            case 'd4'://土方量计算
      case "d4": //土方量计算
                this.Volumetric();
                break;
            case 'd5'://影像对比
      case "d5": //影像对比
                this.CurtainContrast();
                break;
            case 'g1'://坐标定位
      case "g1": //坐标定位
                this.Coordposition();
                break;
        }
    },
    leftTools(res) {
        this.clearLeftTools()
    this.clearLeftTools();
        switch (res.id) {
            case 'l1':
      case "l1":
                break;
            case 'l2':
      case "l2":
                break;
            case 'l3'://在线制图
      case "l3": //在线制图
                this.setThematicMap();
                break;
            case 'l4':
      case "l4":
                break;
            case 'l5':
      case "l5":
                break;
            case 'l6':
      case "l6":
                break;
        }
    },
@@ -63,16 +62,16 @@
    setThematicMap() {
        // earthCtrl.coreMap.scene.mode = SmartEarth.Cesium.SceneMode.SCENE2D;
        // var handle = new SmartEarth.Cesium.ScreenSpaceEventHandler(earthCtrl.viewer.scene.canvas);
    },
    //坐标定位
    Coordposition() {
    },
  Coordposition() {},
    //影像对比
    CurtainContrast() {
        this.toolMenu = earthCtrl.analysis.createCurtainContrast({ leftIndex: 0, rightIndex: 1 })
    this.toolMenu = earthCtrl.analysis.createCurtainContrast({
      leftIndex: 0,
      rightIndex: 1,
    });
    },
    //土方量计算
    Volumetric() {
@@ -81,60 +80,48 @@
    },
    //垂直高度
    verticalHeight() {
        earthCtrl.measure.measureHeight(function (e) {
        })
    earthCtrl.measure.measureHeight(function (e) {});
    },
    //高程测量
    heightMeasure() {
    },
  heightMeasure() {},
    //平面面积
    planeDistance() {
        earthCtrl.analysis.getPlaneArea(function (e) {
        })
    earthCtrl.analysis.getPlaneArea(function (e) {});
    },
    //表面距离
    surfaceDistance() {
        earthCtrl.measure.lineLength(function (e) {
        })
    earthCtrl.measure.lineLength(function (e) {});
    },
    //点漫游
    pointRoam() {
    },
  pointRoam() {},
    //线漫游
    lineRoam() {
    },
  lineRoam() {},
    //清除方法
    clearTopTools() {
        if (this.toolFlag) {
            switch (this.toolFlag) {
                case 'a2':
        case "a2":
                    break;
                case 'a3':
        case "a3":
                    break;
                case 'b2':
                case 'b3':
                case 'b4':
                case 'b5':
        case "b2":
          earthCtrl.tools.browse();
                    break;
                case 'd5':
                    debugger
                    this.toolMenu.removeFromMap()
        case "b3":
        case "b4":
        case "b5":
          earthCtrl.tools.browse();
          break;
        case "d5":
          debugger;
          this.toolMenu.removeFromMap();
                    break;
            }
            // this.toolFlag = null;
            this.toolMenu = null;
        }
    },
    clearLeftTools() {
    },
}
  clearLeftTools() {},
};
export default menuTool;