From e8692ebf024715c922ca0e10f90dc3a1219862b0 Mon Sep 17 00:00:00 2001
From: yangdelong <828900aaa>
Date: 星期三, 07 四月 2021 22:00:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop

---
 src/components/LayerController/logic/WasteGas.js |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/components/LayerController/logic/WasteGas.js b/src/components/LayerController/logic/WasteGas.js
index a83e948..2ac1651 100644
--- a/src/components/LayerController/logic/WasteGas.js
+++ b/src/components/LayerController/logic/WasteGas.js
@@ -20,6 +20,7 @@
   this.init = async (layer, L) => {
     this.animalService = new AnimalService({ L: L, layer: layer })
     const res = await mapApi.getWasteGas()
+    // console.log(res)
     const data = res.Result.DataInfo || {}
     // console.log(data)
     for (let i = 0; i < data.length; i++) {
@@ -29,13 +30,18 @@
       // 瀹氫箟绫诲瀷 鐢ㄦ潵鍖哄垎鏁版嵁
       const ContrLevel = data[i].ContrLevel
       var iconUrl = this.differentTypes(ContrLevel)
-
-      const marker = L.marker.magic([positionX, positionY], {
+      // const marker = L.canvasMarker([positionX, positionY], {
+      //   img: {
+      //     // url: 'assets/images/map/marker-icon.png',
+      //     url: iconUrl,
+      //     size: STYLES.ICON_SIZE
+      //   }
+      const marker = L.marker([positionX, positionY], {
         test: data[i],
         icon: L.icon({
           iconUrl: iconUrl,
-          iconSize: [50, 50],
-          iconAnchor: [25, 25]
+          iconSize: [20, 20],
+          iconAnchor: [10, 10]
         })
       })
       layer.addLayer(marker)
@@ -61,7 +67,7 @@
     // console.log(e.layer.options.test)
     instance.$mount()
     document.body.appendChild(instance.$el)
-    this.setPanTo(e.latlng, 240)
+    this.setPanTo(e.latlng, 80)
   }
   // 涓嶅悓绫诲瀷鍥剧墖鍔犺浇
   this.differentTypes = (ContrLevel) => {

--
Gitblit v1.8.0