北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
lixuliang
2024-01-24 3e9cd0d3d92e18de9ec1a33da835e2e9787cbd93
src/components/sideMenu/layerMenu/layerPanel.vue
@@ -250,7 +250,7 @@
      curFuncIndex: -1,
      curZTIndex: -1,
      state: store.thematicLayer,
      basicMapChecked: store.basicMapChecked.val,
      basicMapChecked: store.basicMapChecked,
      state1: store.tdglInfo,
    };
  },
@@ -304,6 +304,24 @@
    },
    // 二维底图选择
    handleEMapClick(result, index) {
      let p = sgworld.Navigate.getCameraInfo();
      let pitch ;
      if (pitch !== -90) {
        pitch = -90;
        sgworld.Navigate.flyToPointsInterest({
          destination: new Cesium.Cartesian3.fromDegrees(
            p.location.lon,
            p.location.lat,
            p.location.height
          ),
          orientation: {
            heading: Cesium.Math.toRadians(0),
            pitch: Cesium.Math.toRadians(pitch),
            roll: Cesium.Math.toRadians(0),
          },
        });
      }
      // 设置相机
      if (result.name == "二维地图") {
        this.changeLayerView(25000, false);
@@ -477,7 +495,6 @@
    handleFuncClick(index) {
      if (this.curFuncIndex == index) {
        store.setTdglFlag(false);
        store.setSliderShow(false);
        store.setPoplayerListAction({});
        divPoint3 && divPoint3.deleteObject();
        store.setPoplayerShowAction(false);
@@ -488,6 +505,7 @@
        this.curFuncIndex = -1;
        window.clusterLayer && window.clusterLayer.clear();
        if (window.tdglLayer) {
          store.setSliderShow(false);
          sgworld.Creator.DeleteObject(window.tdglLayer);
        }
      } else {
@@ -497,11 +515,10 @@
        store.setMenuListShow(false);
        // 隐藏底部漫游面板
        store.setRoamPanelShow(false);
        //显示滑动条
        store.setSliderShow(true);
        this.curFuncIndex = index;
        switch (index) {
          case 0:
            store.setSliderShow(true);
            window.tdglLayer = sgworld.Creator.createImageryProvider(
              layers[8].name,
              "tms",
@@ -525,12 +542,14 @@
              true,
              ""
            );
            //显示滑动条
            store.setTdglFlag(true);
            break;
          case 1:
            this.curFuncIndex = -1;
            store.setTdglFlag(false);
            if (window.tdglLayer) {
              store.setSliderShow(false);
              sgworld.Creator.DeleteObject(window.tdglLayer);
            }
            store.setHistoryShow(true);
@@ -567,6 +586,7 @@
    "basicMapChecked.val": {
      handler: function (newVal, oldVal) {
        if (newVal == "三维模型") {
          debugger;
          this.handleSMapClick(
            {
              id: "swmx",