Merge pull request #5376 from dataease/pr@dev@fix_flow_map_switch

fix(流向地图): 流向地图切换异常
This commit is contained in:
wisonic-s 2023-05-31 15:50:48 +08:00 committed by GitHub
commit c22dd71823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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