| | |
| | | export default { |
| | | // 爆管 |
| | | bgClick () { |
| | | this.selectPipeLine() |
| | | }, |
| | | // 流向地图上点击 |
| | | selectPipeLine () { |
| | | // console.log(map) |
| | | window.on('click', this.selectClick) |
| | | }, |
| | | // 地图上点击回调 |
| | | selectClick (e) { |
| | | console.log(e) |
| | | // window.map.off('click', this.selectClick) |
| | | // const point = [e.latlng.lng, e.latlng.lat] |
| | | // console.log(point) |
| | | export function createFlowLine (param) { |
| | | const flowLine = window.L.polyline(param.points, param.option) |
| | | flowLine.addTo(window.map) |
| | | return flowLine |
| | | } |
| | | |
| | | export function linkClear (linkClear) { |
| | | if (this.linkClear != null) { |
| | | this.linkClear.remove() |
| | | this.linkClear = null |
| | | } |
| | | } |