| | |
| | | LongLatPos: { |
| | | longPos: '', |
| | | latPos: '' |
| | | } |
| | | }, |
| | | marker: null |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | // console.log(as) |
| | | window.map.setView(as, 17) |
| | | pulseEffect(as) |
| | | const marker = window.L.marker(as, { |
| | | this.marker = window.L.marker(as, { |
| | | icon: window.L.icon({ |
| | | iconUrl: iconUrl, |
| | | iconSize: [30, 30], |
| | | iconAnchor: [15, 15] |
| | | }) |
| | | }) |
| | | window.map.addLayer(marker) |
| | | window.map.addLayer(this.marker) |
| | | window.map.off('click') |
| | | }) |
| | | }, |
| | |
| | | // console.log(as) |
| | | window.map.setView(as, 17) |
| | | pulseEffect(as) |
| | | const marker = window.L.marker(as, { |
| | | this.marker = window.L.marker(as, { |
| | | icon: window.L.icon({ |
| | | iconUrl: iconUrl, |
| | | iconSize: [30, 30], |
| | | iconAnchor: [15, 15] |
| | | }) |
| | | }) |
| | | window.map.addLayer(marker) |
| | | window.map.addLayer(this.marker) |
| | | this.LongLatPos.latPos = '' |
| | | this.LongLatPos.longPos = '' |
| | | }, |
| | | // 点击确认按钮事件 |
| | | confirm () { |
| | | window.mapManager.clearHighlight() |
| | | window.map.removeLayer(this.marker) |
| | | eventBus.$emit('location-setChange', true) |
| | | this.LongLatPos.longPos = '' |
| | | this.LongLatPos.latPos = '' |