From 26e060f15e0ac993dd8bcc842387b7e1c1e5b71f Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期二, 16 三月 2021 20:43:12 +0800
Subject: [PATCH] 修改
---
src/components/panel/ToolBoxPanel.vue | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/components/panel/ToolBoxPanel.vue b/src/components/panel/ToolBoxPanel.vue
index 5db2eae..e7ef163 100644
--- a/src/components/panel/ToolBoxPanel.vue
+++ b/src/components/panel/ToolBoxPanel.vue
@@ -52,7 +52,7 @@
import dowloadChooose from '@assets/images/map-pages/icon/toolbox/Selecd/xiazai.png'
// 鏍囩粯鐨勫彲閫夋嫨鏁版嵁
-// import iconRefinery from '@assets/images/map-pages/local.png'
+import iconRefinery from '@assets/images/map-pages/local.png'
import marker from '@assets/images/map-pages/icon/toolbox/map.png'
import line from '@assets/images/map-pages/icon/toolbox/line.png'
@@ -242,21 +242,25 @@
},
choiceItem (itemT, indexT) {
this.Selecd = indexT
+ // eslint-disable-next-line no-unused-vars
+ const layerGroups = []
switch (itemT.label) {
case '鐐规爣缁�':
var myIcon = this.L.icon({
- iconUrl: '', // iconRefinery
+ iconUrl: iconRefinery,
iconSize: [26, 32],
iconAnchor: [13, 16],
popupAnchor: [26, -32]
})
- var drawLayer = this.map.editTools.startMarker()
+ // eslint-disable-next-line no-case-declarations
+ const drawLayer = this.map.editTools.startMarker()
drawLayer.setIcon(myIcon)
this.drawLayer.addLayer(drawLayer)
- this.setLogic(drawLayer)
+ this.drawLayer.addLayer(this.setLogic(drawLayer))
break
case '绾挎爣缁�':
- var drawLayerLine = this.map.editTools.startPolyline()
+ // eslint-disable-next-line no-case-declarations
+ const drawLayerLine = this.map.editTools.startPolyline()
this.drawLayer.addLayer(drawLayerLine)
this.setLogic(drawLayerLine)
break
@@ -271,10 +275,10 @@
this.setLogic(drawLayerPolygonJ)
break
case '鍦嗗舰':
- var drawLayerPolygonY = this.map.editTools.startCircle()
+ // eslint-disable-next-line no-case-declarations
+ const drawLayerPolygonY = this.map.editTools.startCircle()
this.drawLayer.addLayer(drawLayerPolygonY)
this.setLogic(drawLayerPolygonY)
- // this.drawLayer = this.map.editTools.startCircle()
break
case '鍒犻櫎':
this.drawLayer.clearLayers()
@@ -318,10 +322,7 @@
setLogic (layer) {
layer.on('dblclick', this.L.DomEvent.stop).on('dblclick', layer.toggleEdit)
layer.setStyle({
- color: 'red',
- fillColor: '#ffffff',
- fillOpacity: 0.1,
- fill: true
+ color: 'red'
})
}
}
--
Gitblit v1.8.0