1
wangjuncheng
8 天以前 5a93ff9c70a25e09d77aff8e9175022b63b3060f
src/utils/tools.js
@@ -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;