fix(流向地图): 流向地图切换异常

This commit is contained in:
wisonic-s 2023-05-31 15:50:08 +08:00
parent 3bf4cd6940
commit 8d3654e790

View File

@ -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({