From c3b1af220f56a85491badc2b11ed2c89fee14622 Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期五, 02 四月 2021 11:06:19 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
---
src/components/LayerController/logic/SolidWaste.js | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/src/components/LayerController/logic/SolidWaste.js b/src/components/LayerController/logic/SolidWaste.js
index 3eee0e3..04f0efc 100644
--- a/src/components/LayerController/logic/SolidWaste.js
+++ b/src/components/LayerController/logic/SolidWaste.js
@@ -43,6 +43,12 @@
iconAnchor: [25, 25]
})
})
+ marker.bindTooltip(getSolidWasteData[i].Name, {
+ permanent: true,
+ offset: [0, 14],
+ direction: 'bottom',
+ className: 'company-bindTooltip'
+ })
layer.addLayer(marker)
}
}
@@ -54,8 +60,6 @@
this.clickListener = (e) => {
// 鐐瑰嚮marker鐨刾ulse()鍏夋尝
this.animalService.pulseEffect(e.latlng)
- /* flyTo()寮瑰嚭妗嗗钩绉讳簨浠� */
- // this.setPanTo(e.latlng, 200)
/* 鐐瑰嚮鏁版嵁鐨勬帴鍙h姹� */
this.requestSolidWasteData(e).then(e)
}
@@ -85,15 +89,17 @@
const instance = new PublicBounced()
instance.$mount()
document.body.appendChild(instance.$el)
- instance.setData(resultBasic.Result.DataInfo, resultDetailed, 'gufei')
+ instance.setData(resultBasic.Result.DataInfo, resultDetailed.Result.DataInfo, 'gufei')
+ /* flyTo()寮瑰嚭妗嗗钩绉讳簨浠� */
+ this.setPanTo(e.latlng, 200)
}
// flayTo()
- // this.setPanTo = (pos, value) => {
- // var position = pos
- // position = this.map.latLngToLayerPoint(position)
- // position.y += value
- // position = this.map.layerPointToLatLng(position)
- // this.map.flyTo(position)
- // }
+ 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