| | |
| | | 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' |
| | |
| | | }, |
| | | 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 |
| | |
| | | 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() |
| | |
| | | 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' |
| | | }) |
| | | } |
| | | } |