| | |
| | | this.layersLogic = {} |
| | | this.minZoomLayers = {} |
| | | this.wmsLayers = [] |
| | | this.wmsLayerService = null |
| | | // todo 待优化,wmslayerservice调用,放这里不合适 |
| | | this.clickSwitch = true // 图层点击弹窗开关 |
| | | this.hightlightLayer = options.L.featureGroup({}).addTo(window.map) |
| | | } |
| | | |
| | | init (layerConfig) { |
| | | this.initConfig(layerConfig) |
| | | // wms服务只需要初始化一次 |
| | | this.wmsLayerService = new WmsLayerService(this.wmsLayers) |
| | | this.wmsLayerService = new WmsLayerService() |
| | | this.wmsLayerService.init() |
| | | this.initConfig(layerConfig) |
| | | } |
| | | |
| | | initConfig (layerConfig) { |
| | |
| | | wmsGroupLayerService.init() |
| | | continue |
| | | } */ |
| | | layers && this.init(config.layers) |
| | | childLayer && this.init(config.childLayer) |
| | | layers && this.initConfig(config.layers) |
| | | childLayer && this.initConfig(config.childLayer) |
| | | |
| | | this.initMinZoom(config) |
| | | this.loadLogic(config) |
| | |
| | | logic = new BusiLayer() |
| | | } else if (type === SERVICE_TYPE.WFS) { |
| | | logic = new WfsLayerService(config) |
| | | } else if (type === SERVICE_TYPE.WMS) { |
| | | var layer = {} |
| | | layer[config.code] = config |
| | | this.wmsLayers.push(layer) |
| | | } |
| | | } |
| | | this.layersLogic[code] = logic |