From 3d7c359a73da1e5d796642d35be0e2444d997041 Mon Sep 17 00:00:00 2001
From: seatonwan9 <seatonwan9@163.com>
Date: 星期三, 12 五月 2021 16:10:05 +0800
Subject: [PATCH] 公共方法提取

---
 src/components/LayerController/logic/WasteGas.js |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/src/components/LayerController/logic/WasteGas.js b/src/components/LayerController/logic/WasteGas.js
index 889bcc5..4b3a86b 100644
--- a/src/components/LayerController/logic/WasteGas.js
+++ b/src/components/LayerController/logic/WasteGas.js
@@ -71,7 +71,7 @@
       },
       title: title // 鏍囬
     })
-    this.setPanTo(e.latlng, 150)
+    this.animalService.setPanTo(e.latlng, 150)
   }
   // 涓嶅悓绫诲瀷鍥剧墖鍔犺浇
   this.differentTypes = (ContrLevel) => {
@@ -88,12 +88,5 @@
     //   effectOfChange = ImgGray
     // }
     return effectOfChange
-  }
-  this.setPanTo = (pos, value) => {
-    var position = pos
-    position = window.map.latLngToLayerPoint(position)
-    position.y += value
-    position = window.map.layerPointToLatLng(position)
-    window.map.flyTo(position)
   }
 }

--
Gitblit v1.8.0