From f74731373aa12d468609da8b60d6e503b77ba349 Mon Sep 17 00:00:00 2001
From: chenyabin <Chenab123!>
Date: 星期五, 02 四月 2021 11:39:35 +0800
Subject: [PATCH] 右侧搜索栏统一样式修改。
---
src/components/LayerController/logic/SolidWaste.js | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/components/LayerController/logic/SolidWaste.js b/src/components/LayerController/logic/SolidWaste.js
index 3eee0e3..1459bb9 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)
}
@@ -86,14 +90,16 @@
instance.$mount()
document.body.appendChild(instance.$el)
instance.setData(resultBasic.Result.DataInfo, resultDetailed, '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