From 48a4f9cb2122e74b87a47c6b6539ba8a132647dd Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期三, 31 三月 2021 18:40:02 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

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

diff --git a/src/components/LayerController/logic/Company.js b/src/components/LayerController/logic/Company.js
index 7ccce20..a9a51c9 100644
--- a/src/components/LayerController/logic/Company.js
+++ b/src/components/LayerController/logic/Company.js
@@ -19,10 +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])
+      // console.log(data[i])
       // 缁忕含搴� 浣嶇疆
       const positionX = data[i].Latitude
       const positionY = data[i].Longitude
@@ -33,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)
@@ -41,13 +48,13 @@
   }
 
   this.bindTooltip = (layer) => {
-    console.log(layer)
-    return '浼佷笟'
+    // console.log(layer)
+    // return layer.options.test.name
   }
 
   this.clickListener = (e) => {
-    this.animalService.pulseEffect(e.latlng)
+    // this.animalService.pulseEffect(e.latlng)
     console.log(e)
-    return this.PublicBounced.$el
+    // return this.PublicBounced.$el
   }
 }

--
Gitblit v1.8.0