月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-09-04 d80d032784216bc4a61692476947ab36f53788d7
src/assets/js/Map/menuTool.js
@@ -135,7 +135,7 @@
      fabric: {
        type: "ElevationRamp",
        uniforms: {
          image: config.StaticFileBaseUrl + "/Assets/Images/color.png",
          image: config.StaticFileBaseUrl + "Assets/Images/color.png",
          minimumHeight: -10000,
          maximumHeight: 10000,
        },
@@ -297,19 +297,28 @@
    }
    this.oldLeftMenuId = res.id;
    switch (res.id) {
      case "l1":
        store.state.isShowMap = true;
        break;
      case "l2":
        store.state.isShowMap = true;
        break;
      case "l3": //在线制图
        store.state.isShowMap = true;
        this.setThematicMap();
        break;
      case "l4":
        store.state.isShowMap = true;
        break;
      case "l5":
        store.state.isShowMap = false
        break;
      case "l6":
        store.state.isShowMap = true;
        break;
    }
  },
@@ -320,6 +329,9 @@
        break;
      case "t3":
        this.delRectangle();
        break;
      case "t4":
        store.state.setExportList = !store.state.setExportList
        break;
    }
  },
@@ -352,6 +364,9 @@
    var north1 = ss[3];
    var south1 = ss[1];
    var geometry = Cesium.Rectangle.fromDegrees(west1, south1, east1, north1);
    Viewer.camera.setView({
      destination: Cesium.Rectangle.fromDegrees(west, south, east, north),
    });
@@ -379,6 +394,7 @@
    // var handle = new SmartEarth.Cesium.ScreenSpaceEventHandler(
    //   earthCtrl.viewer.scene.canvas
    // );
  },
  //坐标定位
@@ -495,6 +511,8 @@
  },
  //清除方法
  clearTopTools(id) {
    store.state.doubleMap = false;
    store.state.doubleMenu = false;
    if (earthCtrl.shadows) {
      Viewer.animation.container.style.visibility = "hidden";
      Viewer.timeline.container.style.visibility = "hidden";
@@ -580,10 +598,7 @@
        outlineColor: Cesium.Color.DODGERBLUE,
      }
    });
    window.Viewer.flyTo(locationPolygonEntity, {
      duration: 5,
      offset: new SmartEarth.Cesium.HeadingPitchRange(0.0, SmartEarth.Cesium.Math.toRadians(-20.0))
    });
    this.setViewerFlyTo(locationPolygonEntity)
  },
  setLocationPoint(res, name) {
    const position = window.Viewer.entities.add({
@@ -597,11 +612,20 @@
        scale: 5.0,
      },
    });
    window.Viewer.flyTo(position, {
      duration: 5,
      offset: new SmartEarth.Cesium.HeadingPitchRange(0.0, SmartEarth.Cesium.Math.toRadians(-20.0))
    this.setViewerFlyTo(position)
  },
  setViewerFlyTo(entity) {
    window.Viewer.flyTo(entity, {
      offset: {
        heading: Cesium.Math.toRadians(0.0),
        pitch: Cesium.Math.toRadians(-45),
        range: 40000
      }
    });
  },
  setLocationLine(res, name) {
    var position = [];
@@ -622,10 +646,7 @@
      },
    })
    window.Viewer.flyTo(polyline, {
      duration: 5,
      offset: new SmartEarth.Cesium.HeadingPitchRange(0.0, SmartEarth.Cesium.Math.toRadians(-20.0))
    });
    this.setViewerFlyTo(polyline)
  }
};