From bba9dae2c534caefd1009f3cc7b3889b58566de9 Mon Sep 17 00:00:00 2001 From: 陈泽平 <qibolin02429@126.com> Date: 星期一, 17 五月 2021 10:31:07 +0800 Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop --- src/components/LayerController/service/LayerFactory.js | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/LayerController/service/LayerFactory.js b/src/components/LayerController/service/LayerFactory.js index 8d7c1c6..d88b9a6 100644 --- a/src/components/LayerController/service/LayerFactory.js +++ b/src/components/LayerController/service/LayerFactory.js @@ -17,16 +17,17 @@ 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) { @@ -42,8 +43,8 @@ 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) @@ -77,10 +78,6 @@ 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 -- Gitblit v1.8.0