From 3d24a50891e174d593738aca14c43dfaf8f071b6 Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期三, 07 四月 2021 17:57:31 +0800 Subject: [PATCH] 去掉偏移 --- src/components/LayerController/logic/WasteWater.js | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/LayerController/logic/WasteWater.js b/src/components/LayerController/logic/WasteWater.js index 31e0d53..2ff1db4 100644 --- a/src/components/LayerController/logic/WasteWater.js +++ b/src/components/LayerController/logic/WasteWater.js @@ -33,12 +33,11 @@ // 瀹氫箟绫诲瀷 鐢ㄦ潵鍖哄垎鏁版嵁鐨勪笉鍚� const testValue = data[i].ContrLevel const iconUrl = this.differentTypes(testValue) - const marker = L.marker.magic([positionX, positionY], { + const marker = L.marker([positionX, positionY], { test: data[i], icon: L.icon({ iconUrl: iconUrl, - iconSize: [50, 50], - iconAnchor: [25, 25] + iconSize: [20, 20] }) }) layer.addLayer(marker) @@ -61,7 +60,7 @@ const PublicBounced = window.Vue.extend(publicBounced) const instance = new PublicBounced() instance.setWaterData(e.layer.options.test, result.Result.DataInfo, drawback.Result.DataInfo, 'feishui') - console.log(e.layer.options.test) + // console.log(e.layer.options.test) instance.$mount() document.body.appendChild(instance.$el) this.setPanTo(e.latlng, 240) -- Gitblit v1.8.0