派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-21 b187fa62b3e02d8417d73139dcf3e2271268788d
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
@@ -1,18 +1,16 @@
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 selectPipeLine () {
  window.map.on('click', this.selectClick)
}
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
  }
}