为什么中国地图的时候在中间,换成甘肃地图就不居中了
echarts吧
全部回复
仅看楼主
level 1
就哦魄力 楼主
感激不尽
2017年08月23日 07点08分 1
level 1
就哦魄力 楼主
var myChart1 = echarts.init(document.getElementById('map1'));
var option1 = {
series: [
{
type: 'map',
mapType: 'china',
roam: false,
itemStyle: {
normal: {
areaColor: '#55bff6',/*地图背景色*/
shadowOffsetX: 5,//地图周围的阴影
shadowOffsetY: 5,
shadowBlur: 5,
borderWidth: 1,
borderColor: '#faf160',
shadowColor: '#9480ff',/*鼠标滑过颜色*/
},
emphasis: {
areaColor: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#55bff6' // 0% 处的颜色
//控制鼠标滑过选中区域的颜色 为渐变色
}, {
offset: 1,
color: '#957fff' // 100% 处的颜色
}], false),
label: {
textStyle: {
color: '#fff'
}
},
}
},
label: {
normal: {
show: false,//所有的文字显示
},
emphasis: {
show: true,
areaStyle:{
color:"#154da1",
}
}
},
},
],
};
myChart1.setOption(option1);
2017年08月23日 07点08分 2
level 1
我也遇到同样问题
2017年09月19日 02点09分 3
level 1
修改下甘肃.json就可以了。
2017年09月30日 08点09分 4
level 1
不能上传文件,就把json贴在下面吧!
2017年09月30日 08点09分 5
level 1
改下酒泉市的数据:
"encodeOffsets": [
[
[
97212,
42669
],
[
98700,
43754
]
]
]
},
"properties": {
"cp": [
100.510795,
39.744023
],
"name": "酒泉市",
"childNum": 2
}
2017年09月30日 08点09分 6
调整这样是怎么计算的呀?
2019年01月03日 13点01分
level 1
gansu.js哪有
2018年07月19日 04点07分 7
level 4
可以调整位置的
2019年01月05日 01点01分 8
level 1
楼主解决了吗
2020年08月28日 03点08分 10
1