派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-16 26e060f15e0ac993dd8bcc842387b7e1c1e5b71f
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'
      })
    }
  }