| | |
| | | import L from 'leaflet' |
| | | // import eventBus from "@/components/leaflet/app/eventBus" |
| | | import eventBus from '@components/panel/topicSearch/SewersSelect/AnalysisChoose/eventBus' |
| | | import eventBus from '../../../../../eventBus' |
| | | |
| | | class DrawLine { |
| | | constructor (map) { |
| | |
| | | } |
| | | |
| | | dbClick = (e) => { |
| | | console.log('双击结束', e) |
| | | // console.log('双击结束', e) |
| | | this.polyline.addTo(this.layers) |
| | | // this.close(e.latlng); |
| | | this.map.off('click', this.click).off('mousemove', this.mousemove).off('dblclick', this.dbClick) |
| | | console.log(this.points) |
| | | // console.log(this.points) |
| | | eventBus.$emit('draw-hdm-line', this.points) |
| | | } |
| | | |
| | | destory () { |
| | | if (this.polyline) { this.map.removeLayer(this.polyline) } |
| | | |
| | | if (this.marker) { this.marker.remove() } |
| | | this.points = [] |
| | | this.layers.clearLayers() |