From afcb324911c880deba68e630df0c11502a5b1857 Mon Sep 17 00:00:00 2001 From: lishenfeng Date: Fri, 13 Jun 2025 09:28:51 +0800 Subject: [PATCH] =?UTF-8?q?feat():=20=E7=9B=91=E6=B5=8B=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Home/components/ActionDock/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/Home/components/ActionDock/index.js b/src/views/Home/components/ActionDock/index.js index 8c1836d..f9166d1 100644 --- a/src/views/Home/components/ActionDock/index.js +++ b/src/views/Home/components/ActionDock/index.js @@ -85,7 +85,14 @@ export default function ActionDock({ }) { const viewItem = useMemo(() => viewKey ? VIEWS.filter(o => o.id === viewKey)[0].children : VIEWS, [viewKey, VIEWS]) const dispatch = useDispatch(); - + const removePoint = () => { + const map = window.__mapref; + const layer = map.getLayer('关联站点') + if (layer) { + map.removeLayer('关联站点'); + map.removeSource('关联站点'); + } + } return (
@@ -97,6 +104,7 @@ export default function ActionDock({ }) { setViewKey(null) dispatch.runtime.setScya(false) dispatch.runtime.setGwtc(false) + removePoint() }}>
@@ -136,6 +144,7 @@ export default function ActionDock({ }) { } else { sessionStorage.setItem('point','') } + removePoint() } }}>