月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-06-06 b035823c711d43902a06838065598f4f805ab408
src/assets/js/Map/menuTool.js
@@ -3,8 +3,12 @@
    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'://点漫游
@@ -25,23 +29,73 @@
            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() {
@@ -54,7 +108,7 @@
    },
    //清除方法
    clearTools() {
    clearTopTools() {
        if (this.toolFlag) {
            switch (this.toolFlag) {
                case 'a2':
@@ -69,12 +123,18 @@
                case 'b5':
                    break;
                case 'd5':
                    debugger
                    this.toolMenu.removeFromMap()
                    break;
            }
            this.toolFlag = null;
            // this.toolFlag = null;
            this.toolMenu = null;
        }
    },
    clearLeftTools() {
    },
}
export default menuTool;