From bd59f31b6d5d1de02edc3a454931303753cf9f43 Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期四, 01 四月 2021 09:24:35 +0800 Subject: [PATCH] 弹框点击信息修改 --- src/components/LayerController/logic/SolidWaste.js | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/components/LayerController/logic/SolidWaste.js b/src/components/LayerController/logic/SolidWaste.js index efb3b43..37b4b15 100644 --- a/src/components/LayerController/logic/SolidWaste.js +++ b/src/components/LayerController/logic/SolidWaste.js @@ -1,6 +1,7 @@ /** * 鍥哄簾 */ + // 鍖哄垎涓嶅悓绫诲瀷 浣跨敤涓嶅悓img const defaultImg = '/assets/images/map/solidwaste/voc.png' const setting = '/assets/images/map/solidwaste/gf_green.png' @@ -50,10 +51,17 @@ return layer.options.test.Name } - this.clickListener = async (e) => { + this.clickListener = (e) => { + // 鐐瑰嚮marker鐨刾ulse()鍏夋尝 this.animalService.pulseEffect(e.latlng) + /* flyTo()寮瑰嚭妗嗗钩绉讳簨浠� */ // this.setPanTo(e.latlng, 200) - console.log(e) + /* 鐐瑰嚮鏁版嵁鐨勬帴鍙h姹� */ + this.requestSolidWasteData(e).then(e) + } + + // 鏍规嵁鐐瑰嚮涓嶅悓鏁版嵁 杩涜鎺ュ彛鐨勬暟鎹姹� + this.requestSolidWasteData = async (e) => { const dataValue = { StoragePlaceId: e.layer.options.test.StoragePlaceId } @@ -66,14 +74,14 @@ instance.setData(result.Result.DataInfo, 'gufei') } - // panTo - this.setPanTo = (pos, value) => { - var position = pos - position = this.layer.latLngToLayerPoint(position) - position.y += value - position = this.layer.layerPointToLatLng(position) - this.layer.flyTo(position) - } + // 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.differentTypes = (judgeValue) => { -- Gitblit v1.8.0