perf: overview map优化

This commit is contained in:
chenjinsong
2020-09-07 19:50:37 +08:00
parent 122b98f6f3
commit 6d6e52b0a0
3 changed files with 19 additions and 5244 deletions

File diff suppressed because one or more lines are too long

View File

@@ -101,7 +101,20 @@
}
if(this.chartType == 'map'){
this.option.geo.regions = [];
let geoObj = this.map.geoJson.geoJson;
geoObj.features.forEach(item=>{
if (item.properties.NAME_0 == "Kazakhstan") {
this.option.geo.regions.push({
name: item.properties.NAME_1,
itemStyle: {areaColor: "#eee"},
label: {show: true}
});
}
});
console.info(this.option.geo)
/*let geoObj = this.map.geoJson.geoJson;
geoObj.features.forEach(item=>{
if(this.option.geo.regions){
this.option.geo.regions.push({
@@ -122,7 +135,7 @@
}
}]
}
});
});*/
//let timer = setTimeout(()=>{}, 0);
//地图拖动、缩放时动态读取地图数据
/*this.chart.on("georoam", params => {

View File

@@ -139,6 +139,7 @@
};
const mapOptions={
geo:{
itemStyle: {areaColor: "white"},
map: '',
roam: true,//鼠标是否可以控制缩放
center: [67.45, 48],//当前视角的中心点,用经纬度表示
@@ -154,7 +155,7 @@
},
emphasis:{
itemStyle: {
areaColor:'lightgray'
areaColor:'white'
}
},
left:0,
@@ -162,8 +163,8 @@
right:0,
bottom:0,
scaleLimit: {
min: 3,
max: 15
min: 4,
max: 8
}
},
tooltip : {