+
liuyg
2022-01-08 23cba9212712bf0cbfc054810ff5bbe323334fd7
+
3 files modified
59 ■■■■ changed files
src/components/mobileCortrol/index.vue 16 ●●●● patch | view | raw | blame | history
src/components/mobileCortrolButtom/index.vue 41 ●●●● patch | view | raw | blame | history
src/store/modules/mobile.js 2 ●●● patch | view | raw | blame | history
src/components/mobileCortrol/index.vue
@@ -70,6 +70,7 @@
    width: 35px;
    height: 35px;
    background-color: rgb(33, 150, 243);
    // background-color: white;
    // stroke-width: 10;
    // stroke: #fff;
    display: flex;
@@ -82,8 +83,13 @@
  }
  .m-l-inbut-2d {
    position: relative;
    background-color: white;
    top: 60px;
    font-size: 12px;
    color: #000;
    border: 1px solid #409eff;
    border-radius: 5px 5px 0 0;
    // box-shadow: 0px 0px 10px #409eff inset;
    // &:hover {
    //   background-color: rgb(21, 136, 230);
    //   box-shadow: -2px -2px 3px rgb(3, 74, 136) inset;
@@ -91,12 +97,16 @@
  }
  .m-l-inbut-3d {
    @extend .m-l-inbut-2d;
    top: 55px;
    top: 45px;
    border-radius: 0 0 5px 5px;
  }
  .active {
    // background-color: rgb(92, 181, 255);
    box-shadow: -4px -4px 10px rgb(13, 98, 167) inset;
    background-color: #409eff;
    color: #fff;
    border-radius: 5px;
    z-index: 10;
    // box-shadow: -4px -4px 10px rgb(13, 98, 167) inset;
    // color: rgb(0, 0, 0);
    // box-shadow: -4px -4px 10px rgb(13, 98, 167) inset;
    transform: translateY(1px);
src/components/mobileCortrolButtom/index.vue
@@ -55,7 +55,7 @@
    };
  },
  computed: {
    ...mapGetters(["mviewer", "openmobileGoTo"]),
    ...mapGetters(["mviewer", "openmobileGoTo", "dimensionData"]),
  },
  created() {
    this.DC = global.DC;
@@ -69,19 +69,42 @@
    },
    handleCommand(command) {
      let that = this;
      let position = [+command.lnt + 0.01197, +command.lat + 0.00048];
      let position = [+command.lnt + 0.00027, +command.lat + 0.00048, 450];
      console.log(command, "定位");
      // 定位
      // this.$store.commit("MSETCC_SETCC", {
      //   lntLat: position,
      // });
      this.$store.dispatch("mapFlyTo", {
        //飞入
        lntLat: [...position, 450],
        heading: 0,
        pitch: -90,
        roll: 0,
        noOpen: true,
      // this.$store.dispatch("mapFlyTo", {
      //   //飞入
      //   lntLat: [...position, 450],
      //   heading: 0,
      //   pitch: -90,
      //   roll: 0,
      //   noOpen: true,
      // });
      that.mviewer.camera.setView({
        // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
        // fromDegrees()方法,将经纬度和高程转换为世界坐标
        destination: new global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
          // 114.0351,
          // 27.6314,
          // 200.0
          position[0],
          position[1],
          position[2]
        ),
        orientation: {
          heading: global.DC.Namespace.Cesium.Math.toRadians(
            that.dimensionData.heading
          ),
          pitch: global.DC.Namespace.Cesium.Math.toRadians(
            that.dimensionData.pitch
          ),
          // heading: data.heading,
          // pitch: data.pitch,
          roll: that.dimensionData.roll,
        },
      });
    },
    openBigPopupAfter() {
src/store/modules/mobile.js
@@ -321,6 +321,7 @@
        0,
        state.dimensionData.pitch
      );
      // console.log(state.dimension);
      if (state.dimension != "2.5D") {
        // if (true) {
        dispatch("mapFlyTo", {
@@ -331,7 +332,6 @@
          roll: Position.roll,
        });
      } else {
        // console.log(17878);
        state.mviewer.camera.setView({
          // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
          // fromDegrees()方法,将经纬度和高程转换为世界坐标