liuyg
2021-12-16 997262e44f7f9e8d0cde869cfd026ef8c0850efd
src/components/mobileCortrol/index.vue
@@ -1,7 +1,8 @@
<template>
  <div class="m-left-control">
    <div class="m-l-inbut zoom-in">+</div>
    <div class="m-l-inbut" @click="zoomIn('-')">-</div>
    <div class="m-l-inbut zoom-in" @click="zoomIn">
      <i class="el-icon-refresh"></i>
    </div>
  </div>
</template>
@@ -9,12 +10,31 @@
import { mapGetters } from "vuex";
export default {
  name: "mobileCortrol",
  data() {
    return {
      DC: "",
    };
  },
  computed: {
    ...mapGetters(["mviewer"]),
  },
  created() {
    this.DC = global.DC;
  },
  methods: {
    zoomIn(val) {
      console.log(val);
      let that = this;
      // console.log(val);
      // 121.49592752204283 31.23567802276832
      this.mviewer.zoomToPosition(
        new that.DC.Position(
          121.49592752204283,
          31.23567802276832 - 0.012,
          2530,
          0,
          -45
        )
      );
      // let camera = this.mviewer.camera;
      // // console.log(camera.moveStart());
      // // this.mviewer.getImageryLayerInfo().then((res) => {
@@ -65,11 +85,11 @@
.m-left-control {
  position: fixed;
  left: 20px;
  top: 20px;
  z-index: 200;
  top: 87px;
  z-index: 201 !important;
  .m-l-inbut {
    width: 32px;
    height: 32px;
    width: 35px;
    height: 35px;
    background-color: #c9302c;
    display: flex;
    align-items: center;