zhanghua
9 天以前 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3
src/components/map/index.vue
@@ -12,7 +12,7 @@
    };
  },
  created() {
    debugger
    // if (this.point) {
    //   this._point = this.point;
    // }
@@ -23,11 +23,11 @@
  methods: {
    locationMap() {
      const that = this;
      debugger
      setTimeout(() => {
        // console.log("_zoom---", that.zoom);
        // console.log("_point---", JSON.stringify(that.point));
        that.map.setZoomAndCenter(that._zoom, [that.point.x, that.point.y]);
        that.map.setZoomAndCenter(that.zoom, [that.point.x, that.point.y]);
        if (that.mark) {
          // 创建一个 Marker 实例:
          var marker = new AMap.Marker({
@@ -37,8 +37,14 @@
          // 将创建的点标记添加到已有的地图实例:
          that.map.add(marker);
          marker.on('click',function(e){
            console.log('666')
            that.$emit('fatherMethod')
            // that.$parent.fatherMethod();
          })
        }
      }, 1000);
    },
  },
  mounted() {
@@ -56,7 +62,6 @@
        console.log(e);
      });
    // const that = this;
    // debugger
    // that.map.setZoomAndCenter(that._zoom, [that._point.x, that._point.y]);
    // if (that.mark) {
    //   // 创建一个 Marker 实例: