wangjuncheng
8 天以前 f60f7c614e60221ed7c0ddb93c52608e86f4b57e
src/utils/tools.js
@@ -53,7 +53,7 @@
  },
  // 雨天模拟
  toggleRain(option, show) {
    console.log(option, "option");
    // console.log(option, "option");
    // 先销毁旧实例
    if (this.rainEffect) {
      this.rainEffect.destroy();
@@ -170,7 +170,6 @@
  CreateLabel(pic, show) {
    if (show) {
      earthCtrl.factory.createSimpleGraphic(pic, {}, function (entity) {
        console.log(entity.polyline.positions.getValue(), "entity");
        window.Viewer = earthCtrl.viewer;
        //开启编辑并启用属性弹窗
        earthCtrl.factory.SimpleGraphic.edit(true, {
@@ -672,10 +671,9 @@
      this.movingCircleViewshed = null;
    }
  },
  // 阴影分析
  AnalysisSunshine() {
    if (!layerIsOpen) {
      layerIsOpen = true;
      let currentTime = viewer.clock.currentTime.clone();
      let startTime = viewer.clock.startTime.clone();
      let stopTime = viewer.clock.stopTime.clone();
@@ -684,17 +682,19 @@
        type: 2,
        title: "阴影分析",
        shade: false,
        area: ["350px", "500px"],
        offset: "l",
        skin: "yyfxForm",
        content: SmartEarthRootUrl + "Workers/analysis/AnalysisSunshine.html",
        area: ["350px", "350px"],
        offset: "r",
        skin: "other-class",
        content: SmartEarthRootUrl + "Workers/analysis/AnalysisShadow.html",
        end: () => {
          window._AnalysisSunshine && window._AnalysisSunshine.remove();
          window._AnalysisSunshine = undefined;
          layerIsOpen = false;
        },
          Viewer.clock.currentTime = currentTime;
          Viewer.clock.startTime = startTime;
          Viewer.clock.stopTime = stopTime;
          Viewer.clock.multiplier = multiplier;
          Viewer.shadows = false;
          Viewer.shadowLayer = false;
        }
      });
    }
  },
  transformCartesianToCoord(position) {
    const cartographic = SmartEarth.Cesium.Cartographic.fromCartesian(position);
@@ -963,6 +963,12 @@
      this.contourLabel.showContourLabel(false);
    }
  },
  enableAtmosphere() {
    earthCtrl.atmosphere.enable();
  },
  disableAtmosphere() {
    earthCtrl.atmosphere.disable();
  },
};
export default mapUtils;