From 81e426e19db140e630f45409c1569fe16dbcc33f Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期二, 18 五月 2021 15:25:19 +0800
Subject: [PATCH] 修复点击弹窗bug

---
 src/utils/utils.js |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/src/utils/utils.js b/src/utils/utils.js
index 2328fd0..31e0afa 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -27,15 +27,15 @@
  * 鑴夊啿鏁堟灉
  */
 export function pulseEffect (xy) {
-  let times = 5
-  const colors = ['#98FB98', '#ff0000']
+  let times = 1000
+  const colors = ['#00f100', '#ff0000']
   // 鎻掍欢 鏁堟灉瀹炵幇
   var pulsingIcon = window.L.icon.pulse({
-    iconSize: [20, 20],
+    iconSize: [30, 30],
     color: colors[0],
     fillColor: ''
   })
-  var picGroupMarker = window.L.marker(xy, { icon: pulsingIcon }).addTo(window.map)
+  var picGroupMarker = window.L.marker(xy, { icon: pulsingIcon }).addTo(window.mapManager.hightlightLayer)
   // 瀹氭椂
   var timeInterval = setInterval(() => {
     if (times > 0) {
@@ -47,6 +47,31 @@
   }, 1000)
 }
 
+export function reversePolyLine (feature) {
+  const coordinates = feature.geometry.coordinates
+  var latlng = []
+  for (var j = 0; j < coordinates.length; j++) {
+    const coordinate = coordinates[j]
+    latlng.push(coordinate.reverse())
+  }
+  return latlng
+}
+
+export function reverseMultiLine (feature) {
+  const coordinates = feature.geometry.coordinates
+  var latlng = []
+  for (var j = 0; j < coordinates.length; j++) {
+    const coordinate = coordinates[j]
+    var xy = []
+    for (var k = 0; k < coordinate.length; k++) {
+      const coor = coordinate[k]
+      xy.push(coor.reverse())
+    }
+    latlng.push(xy)
+  }
+  return latlng
+}
+
 /**
  * 璁剧疆寮圭獥骞崇Щ浣嶇疆
  * @param pos

--
Gitblit v1.8.0