forked from github/dataease
fix(流向地图): 流向地图切换异常
This commit is contained in:
parent
3bf4cd6940
commit
8d3654e790
@ -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