From 851d91b60b91865f2d6964b2981244cb523aa331 Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期六, 08 五月 2021 10:56:51 +0800
Subject: [PATCH] 新增图层点击弹窗开关

---
 src/components/LayerController/service/WmsLayerService.js |    2 +-
 src/components/LayerController/service/LayerFactory.js    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/LayerController/service/LayerFactory.js b/src/components/LayerController/service/LayerFactory.js
index f7ee38d..f9810db 100644
--- a/src/components/LayerController/service/LayerFactory.js
+++ b/src/components/LayerController/service/LayerFactory.js
@@ -17,7 +17,7 @@
     this.layersLogic = {}
     this.minZoomLayers = {}
     this.wmsLayers = []
-    this.clickSwitch = false
+    this.clickSwitch = true // 鍥惧眰鐐瑰嚮寮圭獥寮�鍏�
   }
 
   init (layerConfig) {
diff --git a/src/components/LayerController/service/WmsLayerService.js b/src/components/LayerController/service/WmsLayerService.js
index 9295f45..3a2f882 100644
--- a/src/components/LayerController/service/WmsLayerService.js
+++ b/src/components/LayerController/service/WmsLayerService.js
@@ -76,7 +76,7 @@
 
   clickListener () {
     window.map.on('click', (e) => {
-      if (window.layerFactory.clickSwitch) {
+      if (!window.layerFactory.clickSwitch) {
         return
       }
       this.featureGroup.clearLayers()

--
Gitblit v1.8.0