From f1d92a66c3d5f2c0b1625dc17f045f5f5a24e247 Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期三, 31 三月 2021 19:22:48 +0800
Subject: [PATCH] 图表

---
 src/components/LayerController/logic/Company.js |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/src/components/LayerController/logic/Company.js b/src/components/LayerController/logic/Company.js
index f4ff3f0..a9a51c9 100644
--- a/src/components/LayerController/logic/Company.js
+++ b/src/components/LayerController/logic/Company.js
@@ -19,9 +19,10 @@
       layer: layer
     })
     const res = await mapApi.getCompany()
-    console.log(res)
+    // console.log(res)
     const data = res.Result.DataInfo || {}
     for (let i = 0; i < data.length; i++) {
+      // console.log(data[i])
       // 缁忕含搴� 浣嶇疆
       const positionX = data[i].Latitude
       const positionY = data[i].Longitude
@@ -32,7 +33,14 @@
           iconUrl: iconUrl,
           iconSize: [50, 50],
           iconAnchor: [25, 25]
-        })
+        }),
+        test: data[i]
+      })
+      marker.bindTooltip(data[i].name, {
+        permanent: true,
+        offset: [0, -16],
+        direction: 'top',
+        className: ''
       })
 
       layer.addLayer(marker)
@@ -40,20 +48,13 @@
   }
 
   this.bindTooltip = (layer) => {
-    console.log(layer)
-    return '浼佷笟'
+    // console.log(layer)
+    // return layer.options.test.name
   }
 
-  this.clickListener = (layer) => {
-    /* this.animalService.pulseEffect(e.latlng)
+  this.clickListener = (e) => {
+    // this.animalService.pulseEffect(e.latlng)
     console.log(e)
-    return this.PublicBounced.$el
-    */
-    console.log(layer)
+    // return this.PublicBounced.$el
   }
-
-  // 鍥哄簾鐐瑰嚮杩涜鐨� 鍐呭鐨勮缃�
-  // SetSolidWasteContent (config, containerPopup) {
-  //   this.SolidWastePopup = containerPopup
-  // }
 }

--
Gitblit v1.8.0