| | |
| | | }; |
| | | }, |
| | | created() { |
| | | debugger |
| | | |
| | | // if (this.point) { |
| | | // this._point = this.point; |
| | | // } |
| | |
| | | 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({ |
| | |
| | | |
| | | // 将创建的点标记添加到已有的地图实例: |
| | | that.map.add(marker); |
| | | marker.on('click',function(e){ |
| | | console.log('666') |
| | | that.$emit('fatherMethod') |
| | | // that.$parent.fatherMethod(); |
| | | |
| | | }) |
| | | } |
| | | }, 1000); |
| | | |
| | | }, |
| | | }, |
| | | mounted() { |
| | |
| | | console.log(e); |
| | | }); |
| | | // const that = this; |
| | | // debugger |
| | | // that.map.setZoomAndCenter(that._zoom, [that._point.x, that._point.y]); |
| | | // if (that.mark) { |
| | | // // 创建一个 Marker 实例: |