- 需要地理geojson地理信息数据:中国1份,省级34份,地级市345份;
- 根据单击事件来渲染不同层级的地图;
- [“北京”, “天津”, “上海”, “重庆”, “香港”, “澳门”]等//直辖市和特别行政区,只有二级地图,没有三级地图;
- 不同级别的散点图需要根据地图名称来判断调用,否则散点图会在不同层级上重复显示;
option.geo = {
map: map,
show: true,
roam: true,
label: {
normal: {
show: false,
textStyle: {
color: "#ffea00"
}
},
emphasis: {
show: false,
textStyle: {
color: "#FFF"
}
}
},
itemStyle: {
normal: {
borderColor: 'rgba(147, 235, 248, 0.6)',
borderWidth: 1,
opacity: 1,
areaColor: {
type: 'linear-gradient',
x: 0,
y: 1000,
x2: 800,
y2: 0,
colorStops: [{
offset: 0.2,
color: '#45a2c6'
}, {
offset: 1,
color: '#004056'
}],
global: t