From 97e8d550c9867f7a92c56060835db2969e6fca2e Mon Sep 17 00:00:00 2001
From: chenyabin <Chenab123!>
Date: 星期三, 31 三月 2021 15:44:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop

---
 src/components/LayerController/logic/Sample.js |   44 ++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/src/components/LayerController/logic/Sample.js b/src/components/LayerController/logic/Sample.js
index 063123f..20fe78f 100644
--- a/src/components/LayerController/logic/Sample.js
+++ b/src/components/LayerController/logic/Sample.js
@@ -1,9 +1,45 @@
+/**
+ * 搴熸皵
+ */
+const AnimalService = require('../service/AnimalService').default
+const AjaxUtils = require('../../../utils/AjaxUtils').default
+
 module.exports = function () {
-  this.init = (L) => {
-    console.log('sample init !!!')
+  /**
+   * 杩斿洖marker瀵硅薄鏁扮粍
+   * @param L leaflet瀵硅薄
+   */
+  this.init = (layer, L) => {
+    this.animalService = new AnimalService({ L: L, layer: layer })
+    AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', {
+      companyId: 3900100145,
+      id: '',
+      monType: 1,
+      userCode: 'wenchun.deng',
+      monDuration: '',
+      epName: '',
+      secdDeptId: '',
+      contrLevel: '',
+      dataStatus: '',
+      dataFlag: '',
+      runStatus: '',
+      emissTypeId: ''
+    }, function (res) {
+      const data = res.data.Result.DataInfo
+      for (let i = 0; i < data.length; i++) {
+        // 缁忕含搴� 浣嶇疆
+        const positionX = data[i].Latitude
+        const positionY = data[i].Longitude
+        layer.addLayer(L.marker([positionX, positionY], { test: '122224' }))
+      }
+    })
   }
 
-  this.clickListener = (e, data) => {
-    console.log('sample clickListener !!!')
+  this.bindTooltip = (layer) => {
+    return layer.options.test
+  }
+
+  this.clickListener = (e) => {
+    this.animalService.pulseEffect(e.latlng)
   }
 }

--
Gitblit v1.8.0