surprise
2024-04-18 73e597792d7388309dff79e2c7107485a9bfc7c1
src/components/wggl/left/czll.vue
@@ -84,6 +84,11 @@
              :style="move1">
          <span class="mapinner1">影像图</span>
        </span>
        <span id="img2"
              @click="changeMap2"
              :style="move2">
          <span class="mapinner2">地形图</span>
        </span>
      </div>
    </div>
  </div>
@@ -91,7 +96,7 @@
<script>
let gdMap=null;
let dxMap=null;
import { addMpt } from "../../../utils/work";
import bus from "../../../utils/bus";
export default {
@@ -99,6 +104,11 @@
    return {
      move1: {
        transform: "translateX(-230px)",
        "z-index": "2",
        transition: "transform,1s",
      },
      move2: {
        transform: "translateX(-450px)",
        "z-index": "2",
        transition: "transform,1s",
      },
@@ -166,26 +176,60 @@
          bus.$emit("showdio",this.nowchoose);
          break;
      }
    },makebig () {
    },
    makebig () {
      this.istrue=false;
      this.move1.transform="translateX(0px)";
      this.move2.transform="translateX(0px)";
    },
    makeSmall () {
      this.istrue=true;
      this.move1.transform="translateX(-230px)";
      this.move2.transform="translateX(-450px)";
    },
    changeMap1 () {
      Viewer.imageryLayers._layers[0].show=true;
      addMpt(true);
      if(dxMap) {
        dxMap.setVisibility(false);
      }
      if(gdMap) {
        gdMap.setVisibility(false);
        this.move1["z-index"]=2;
        // this.move1["z-index"]=3;
      } else {
        return;
      }
    },
    changeMap2 () {
      Viewer.imageryLayers._layers[0].show=false;
      if(gdMap) {
        gdMap.setVisibility(false);
      }
      addMpt(true);
      if(dxMap) {
        dxMap.setVisibility(true);
      } else {
        var base={
          url: "http://t0.tianditu.com/ter_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=ter&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=94a34772eb88317fcbf8428e10448561",
        };
        dxMap=sgworld.Creator.createWebMapTileServerImageLayer(
          "街道",
          base,
          "0",
          undefined,
          true,
          ""
        );
      }
    },
    changeMap () {
      this.move1["z-index"]=0;
      // this.move1["z-index"]=0;
      // this.move1["z-index"]=1;
      Viewer.imageryLayers._layers[0].show=false;
      addMpt(false);
      if(gdMap) {
@@ -308,11 +352,23 @@
  background-position: center;
  position: absolute;
  margin: 20px;
  left: 350px;
  left: 320px;
}
#img2 {
  width: 260px;
  height: 146px;
  background: url(../../../assets/image/change/dixing.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  margin: 20px;
  left: 600px;
}
.botImg {
  width: 540px;
  width: 840px;
  height: 190px;
  background: skyblue;
  background: transparent;
}
.botImg1 {