| | |
| | | longPos: '', |
| | | latPos: '' |
| | | }, |
| | | marker: null |
| | | marker: window.L.layerGroup().addTo(window.map), |
| | | layersGroupArrList: [] |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }) |
| | | }) |
| | | window.map.addLayer(this.marker) |
| | | this.layersGroupArrList.push(this.marker) |
| | | window.map.off('click') |
| | | }) |
| | | }, |
| | |
| | | this.marker = window.L.marker(as, { |
| | | icon: window.L.icon({ |
| | | iconUrl: iconUrl, |
| | | iconSize: [30, 40], |
| | | iconAnchor: [15, 20] |
| | | iconSize: [26, 40], |
| | | iconAnchor: [13, 20] |
| | | }) |
| | | }) |
| | | window.map.addLayer(this.marker) |
| | | this.layersGroupArrList.push(this.marker) |
| | | } else { |
| | | this.$message('请输入识取经纬度') |
| | | } |
| | | }, |
| | | // 点击确认按钮事件 |
| | | confirm () { |
| | | for (let i = 0; i < this.layersGroupArrList.length; i++) { |
| | | window.map.removeLayer(this.layersGroupArrList[i]) |
| | | } |
| | | window.mapManager.clearHighlight() |
| | | window.map.removeLayer(this.marker) |
| | | // window.map.removeLayer(this.marker) |
| | | eventBus.$emit('location-setChange', true) |
| | | this.lonlatpos.longPos = '' |
| | | this.lonlatpos.latPos = '' |