| | |
| | | /** |
| | | * 创建图层相关的类 |
| | | */ |
| | | import L from 'leaflet' |
| | | |
| | | class ServiceLayerHelper { |
| | | constructor (options) { |
| | | this.map = options.map |
| | | this.L = options.L |
| | | this.L = window.L |
| | | this.tileLayersMap = new Map() |
| | | this.tileLayersWMSArray = [] |
| | | this.tileLayerWmslayerGroup = L.layerGroup().addTo(this.map) |
| | | this.tileLayerWmslayerGroup = this.L.layerGroup().addTo(this.map) |
| | | this.tileLayersWMTSArray = [] |
| | | this.tileLayersTileArray = [] |
| | | this.mapConfig = {} |
| | |
| | | layers: options.layers || 'all', // country |
| | | format: options.format || 'image/png', |
| | | transparent: options.true || true, |
| | | crs: options.crs || L.CRS.EPSG4326, |
| | | crs: options.crs || this.L.CRS.EPSG4326, |
| | | maxZoom: options.maxZoom || 21, |
| | | minZoom: options.minZoom || 1, |
| | | zoomOffset: options.zoomOffset || 0 |