Merge pull request #4408 from dataease/pr@dev@fix_map_geo_interacting

fix(视图): 地图范围相互影响
This commit is contained in:
fit2cloud-chenyw 2023-01-29 14:47:57 +08:00 committed by GitHub
commit 930c57ad2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,7 +217,6 @@ export default {
}
})
}
//
if (opt.geo) {
if (opt.geo instanceof Array) {
opt.geo[0].roam = this.active
@ -225,7 +224,6 @@ export default {
opt.geo.roam = this.active
}
}
//
if (this.chart.type === 'treemap' && opt.series) {
opt.series[0].roam = this.active
}
@ -413,8 +411,10 @@ export default {
},
initMapChart(geoJson, chart, curAreaCode) {
this.formatGeoJson(geoJson)
this.$echarts.registerMap('MAP', geoJson)
const mapId = 'MAP' + this.chartId
this.$echarts.registerMap(mapId, geoJson)
const base_json = JSON.parse(JSON.stringify(BASE_MAP))
base_json.geo.map = mapId
let themeStyle = null
if (this.themeStyle) {
themeStyle = JSON.parse(JSON.stringify(this.themeStyle))