| | |
| | | const option = mapOption || MapConfig.mapOptions |
| | | map = L.map(div, option) |
| | | |
| | | map.on('click', (event, a, b) => { |
| | | console.log(event, a, b) |
| | | }) |
| | | |
| | | // eventBus.$emit('map-obj', map) |
| | | |
| | | window.map = map |
| | |
| | | } |
| | | |
| | | add (config) { |
| | | const code = config.code |
| | | for (var k in this.layersConfig) { |
| | | if (code === k) { |
| | | return false |
| | | const wmsLayers = config.wmsLayers |
| | | if (wmsLayers) { |
| | | if (this.layers.indexOf(wmsLayers) < 0) { |
| | | this.layers.push(config.wmsLayers) |
| | | this.wmsLayer.setParams({ layers: this.layers.join(',') }) |
| | | } |
| | | } |
| | | this.layers.push(config.wmsLayers) |
| | | this.wmsLayer.setParams({ layers: this.layers.join(',') }) |
| | | } |
| | | |
| | | remove (config) { |
| | |
| | | name: '事故水线', |
| | | sname: '事故水', |
| | | checked: false, |
| | | wmsLayers: 'sewer:pipeline_accident', |
| | | // wmsLayers: 'sewer:pipeline_accident', |
| | | type: 0, |
| | | minZoom: 13, |
| | | wfs: WFS_URL + '?TYPENAME=事故水' |