mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 12:03:05 +08:00
Merge pull request #5376 from dataease/pr@dev@fix_flow_map_switch
fix(流向地图): 流向地图切换异常
This commit is contained in:
commit
c22dd71823
@ -14,7 +14,12 @@ export function baseFlowMapOption(chartDom, chartId, chart, action) {
|
|||||||
const mapStyle = `amap://styles/${color.mapStyle ? color.mapStyle : 'normal'}`
|
const mapStyle = `amap://styles/${color.mapStyle ? color.mapStyle : 'normal'}`
|
||||||
const lang = getLanguage().includes('zh') ? 'zh' : 'en'
|
const lang = getLanguage().includes('zh') ? 'zh' : 'en'
|
||||||
let init = false
|
let init = false
|
||||||
if (!chartDom) {
|
if (!chartDom?.map) {
|
||||||
|
try {
|
||||||
|
chartDom.destroy()
|
||||||
|
} catch (e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
chartDom = new Scene({
|
chartDom = new Scene({
|
||||||
id: chartId,
|
id: chartId,
|
||||||
map: new GaodeMap({
|
map: new GaodeMap({
|
||||||
|
Loading…
Reference in New Issue
Block a user