From b620b2f8962a0a1fea3846db83b98704820e16b9 Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期三, 07 四月 2021 17:54:11 +0800
Subject: [PATCH] 修改图标大小

---
 src/components/LayerController/logic/WasteGas.js   |    2 +-
 src/components/LayerController/logic/Company.js    |    6 +++---
 src/components/LayerController/logic/WasteWater.js |    4 ++--
 src/components/LayerController/logic/SolidWaste.js |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/components/LayerController/logic/Company.js b/src/components/LayerController/logic/Company.js
index 8fda8d0..ae08aa5 100644
--- a/src/components/LayerController/logic/Company.js
+++ b/src/components/LayerController/logic/Company.js
@@ -28,11 +28,11 @@
       const positionY = data[i].Longitude
 
       var iconUrl = companyImg
-      const marker = L.marker.magic([positionX, positionY], {
+      const marker = L.marker([positionX, positionY], {
         icon: L.icon({
           iconUrl: iconUrl,
-          iconSize: [50, 50],
-          iconAnchor: [25, 25]
+          iconSize: [30, 30],
+          iconAnchor: [13, 5]
         }),
         test: data[i]
       })
diff --git a/src/components/LayerController/logic/SolidWaste.js b/src/components/LayerController/logic/SolidWaste.js
index ffbedfa..ac5807f 100644
--- a/src/components/LayerController/logic/SolidWaste.js
+++ b/src/components/LayerController/logic/SolidWaste.js
@@ -39,7 +39,7 @@
         totransferData: getSolidWasteData[i],
         icon: L.icon({
           iconUrl: iconUrl,
-          iconSize: [50, 50],
+          iconSize: [20, 20],
           iconAnchor: [25, 25]
         })
       })
diff --git a/src/components/LayerController/logic/WasteGas.js b/src/components/LayerController/logic/WasteGas.js
index 8a6d9f2..2fba1fa 100644
--- a/src/components/LayerController/logic/WasteGas.js
+++ b/src/components/LayerController/logic/WasteGas.js
@@ -40,7 +40,7 @@
         test: data[i],
         icon: L.icon({
           iconUrl: iconUrl,
-          iconSize: [20, 35],
+          iconSize: [20, 20],
           iconAnchor: [10, 20]
         })
       })
diff --git a/src/components/LayerController/logic/WasteWater.js b/src/components/LayerController/logic/WasteWater.js
index b6bbf06..374b747 100644
--- a/src/components/LayerController/logic/WasteWater.js
+++ b/src/components/LayerController/logic/WasteWater.js
@@ -33,11 +33,11 @@
       // 瀹氫箟绫诲瀷 鐢ㄦ潵鍖哄垎鏁版嵁鐨勪笉鍚�
       const testValue = data[i].ContrLevel
       const iconUrl = this.differentTypes(testValue)
-      const marker = L.marker.magic([positionX, positionY], {
+      const marker = L.marker([positionX, positionY], {
         test: data[i],
         icon: L.icon({
           iconUrl: iconUrl,
-          iconSize: [50, 50],
+          iconSize: [20, 20],
           iconAnchor: [25, 25]
         })
       })

--
Gitblit v1.8.0