perf: overview map优化
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -101,7 +101,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(this.chartType == 'map'){
|
if(this.chartType == 'map'){
|
||||||
|
this.option.geo.regions = [];
|
||||||
|
|
||||||
let geoObj = this.map.geoJson.geoJson;
|
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=>{
|
geoObj.features.forEach(item=>{
|
||||||
if(this.option.geo.regions){
|
if(this.option.geo.regions){
|
||||||
this.option.geo.regions.push({
|
this.option.geo.regions.push({
|
||||||
@@ -122,7 +135,7 @@
|
|||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
//let timer = setTimeout(()=>{}, 0);
|
//let timer = setTimeout(()=>{}, 0);
|
||||||
//地图拖动、缩放时动态读取地图数据
|
//地图拖动、缩放时动态读取地图数据
|
||||||
/*this.chart.on("georoam", params => {
|
/*this.chart.on("georoam", params => {
|
||||||
|
|||||||
@@ -139,6 +139,7 @@
|
|||||||
};
|
};
|
||||||
const mapOptions={
|
const mapOptions={
|
||||||
geo:{
|
geo:{
|
||||||
|
itemStyle: {areaColor: "white"},
|
||||||
map: '',
|
map: '',
|
||||||
roam: true,//鼠标是否可以控制缩放
|
roam: true,//鼠标是否可以控制缩放
|
||||||
center: [67.45, 48],//当前视角的中心点,用经纬度表示
|
center: [67.45, 48],//当前视角的中心点,用经纬度表示
|
||||||
@@ -154,7 +155,7 @@
|
|||||||
},
|
},
|
||||||
emphasis:{
|
emphasis:{
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
areaColor:'lightgray'
|
areaColor:'white'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
left:0,
|
left:0,
|
||||||
@@ -162,8 +163,8 @@
|
|||||||
right:0,
|
right:0,
|
||||||
bottom:0,
|
bottom:0,
|
||||||
scaleLimit: {
|
scaleLimit: {
|
||||||
min: 3,
|
min: 4,
|
||||||
max: 15
|
max: 8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tooltip : {
|
tooltip : {
|
||||||
|
|||||||
Reference in New Issue
Block a user