From 8d3654e790bac806457afd6de8f7e24294ff54a1 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Wed, 31 May 2023 15:50:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=81=E5=90=91=E5=9C=B0=E5=9B=BE):=20?= =?UTF-8?q?=E6=B5=81=E5=90=91=E5=9C=B0=E5=9B=BE=E5=88=87=E6=8D=A2=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/map/map_antv.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/chart/map/map_antv.js b/frontend/src/views/chart/chart/map/map_antv.js index db7afc8516..3db4064e75 100644 --- a/frontend/src/views/chart/chart/map/map_antv.js +++ b/frontend/src/views/chart/chart/map/map_antv.js @@ -14,7 +14,12 @@ export function baseFlowMapOption(chartDom, chartId, chart, action) { const mapStyle = `amap://styles/${color.mapStyle ? color.mapStyle : 'normal'}` const lang = getLanguage().includes('zh') ? 'zh' : 'en' let init = false - if (!chartDom) { + if (!chartDom?.map) { + try { + chartDom.destroy() + } catch (e) { + // ignore + } chartDom = new Scene({ id: chartId, map: new GaodeMap({