From a2cf1dafa47139ef92135376db24ece72d2b51d2 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期一, 17 五月 2021 17:19:41 +0800
Subject: [PATCH] 管线分析
---
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js
index ebd24e8..386bdb3 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js
@@ -1,6 +1,5 @@
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) {
@@ -32,24 +31,20 @@
mousemove = (e) => {
this.points.push(e.latlng)
if (this.polyline) { this.map.removeLayer(this.polyline) }
- this.polyline = L.polyline(this.points, { showMeasurements: true, color: 'red' })
+ this.polyline = L.polyline(this.points, { showMeasurements: false, color: 'red' })
this.polyline.addTo(this.layers)
this.layers.addTo(this.map)
this.points.pop()
}
dbClick = (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)
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()
--
Gitblit v1.8.0