From dcd10e4906fd6f903c35791f591833b8f26af1e8 Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期二, 16 三月 2021 20:35:51 +0800
Subject: [PATCH] 修改
---
src/components/panel/ToolBoxPanel.vue | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/src/components/panel/ToolBoxPanel.vue b/src/components/panel/ToolBoxPanel.vue
index e3d5d7d..acd445f 100644
--- a/src/components/panel/ToolBoxPanel.vue
+++ b/src/components/panel/ToolBoxPanel.vue
@@ -250,13 +250,15 @@
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,9 +273,13 @@
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)
+ break
+ case '鍒犻櫎':
+ this.drawLayer.clearLayers()
break
case '璺濈':
Measure.startMeasureLen(this.map, this.L)
@@ -289,7 +295,7 @@
exportOnly: true,
hideControlContainer: true
}).addTo(this.map)
- printer.printMap('CurrentSize', 'MyManualPrint')
+ printer.printMap('CurrentSize', '鍏ㄥ睆')
break
case 'A4妯悜':
var printerX = this.L.easyPrint({
@@ -298,7 +304,7 @@
exportOnly: true,
hideControlContainer: true
}).addTo(this.map)
- printerX.printMap('A4Landscape page', 'MyManualPrint')
+ printerX.printMap('A4Landscape page', '妯悜')
break
case 'A4绾靛悜':
var printerY = this.L.easyPrint({
@@ -307,21 +313,14 @@
exportOnly: true,
hideControlContainer: true
}).addTo(this.map)
- printerY.printMap('A4Portrait page', 'MyManualPrint')
- break
- case '鍒犻櫎':
- // this.map.removeLayer(this.drawLayer)
- this.drawLayer.clearLayers()
+ printerY.printMap('A4Portrait page', '绾靛悜')
break
}
},
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