+
liuyg
2021-12-17 4d39edd970d8517f416b4cec2d9babad8e5d95b5
src/components/mobilemap/index.vue
@@ -15,6 +15,10 @@
    <mobilePopupOurAfter v-if="mBigPopupAfter"></mobilePopupOurAfter>
    <!-- 大弹窗 -->
    <mobilePopupOur :style="[bigPopup]" v-if="mBigPopup"></mobilePopupOur>
    <!-- 测试-跳转位置 -->
    <mobileGoTo></mobileGoTo>
    <!-- 实景窗口 -->
    <mobilePanorama></mobilePanorama>
  </div>
</template>
<script>
@@ -143,22 +147,8 @@
        iconUrl: "examples/images/icon/img.png",
        name: "影像",
      });
      // let nowPosition = "";
      // 地图移动事件
      viewer.on(DC.MouseEventType.MOUSE_MOVE, (e) => {
        if (!that.iconHide) {
          that.$store.commit("MSET_ICONHIDE", true);
        }
        that.$store.dispatch("closeMobileWindowsDom"); //关闭弹窗
        // if (!that.MobileWindowsHide && that.popupsDom) {
        //   that.popupsDom.closeOur();
        //   that.$store.commit("MSET_MOBILEWINDOWSHIDE", true);
        // }
        // nowPosition = [e.wgs84Position.lng, e.wgs84Position.lat];
        // console.log(nowPosition);
      });
      // // eslint-disable-next-line camelcase
      // eslint-disable-next-line camelcase
      // const baselayer_shaded = DC.ImageryLayerFactory.createArcGisImageryLayer({
      //   url: "http://services.arcgisonline.com/arcgis/rest/services/World_Shaded_Relief/MapServer",
      // });
@@ -184,6 +174,20 @@
      //   iconUrl: "examples/images/icon/ter.png",
      //   name: "地形",
      // });
      // 地图移动事件
      viewer.on(DC.MouseEventType.MOUSE_MOVE, (e) => {
        if (!that.iconHide) {
          that.$store.commit("MSET_ICONHIDE", true);
        }
        that.$store.dispatch("closeMobileWindowsDom"); //关闭弹窗
        // if (!that.MobileWindowsHide && that.popupsDom) {
        //   that.popupsDom.closeOur();
        //   that.$store.commit("MSET_MOBILEWINDOWSHIDE", true);
        // }
        // nowPosition = [e.wgs84Position.lng, e.wgs84Position.lat];
        // console.log(nowPosition);
      });
      const layer = new DC.TilesetLayer("layer");
      viewer.addLayer(layer);
@@ -217,7 +221,7 @@
        viewer.scene.globe.depthTestAgainstTerrain = false;
        // console.log(document.getElementById("mobile-map_content_content"));
        // console.log(e.position);
        console.log(e);
        // 定制化窗体
        that.openPopupS(e.position, [e.wgs84Position.lng, e.wgs84Position.lat]);
@@ -247,6 +251,7 @@
        position,
        lntLat,
        query: { ...(query || {}), position, lntLat },
        useJWD: true, //仅使用经纬度
      };
      that.$store.dispatch("setMobileWindows", d);
    },