错误信息 因为我是导入的山东省地图
解决方法:
1.查看自己导入registerMap的地图信息名称是否与geo名称一致 需要达到一致
this.$echarts.registerMap('shandong', geoJson.data.data)
geo: {
map: 'shandong',//这个名称
aspectScale: 0.9,
roam: false,
zoom: 1.2,
layoutSize: '95%',
layoutCenter: ['55%', '50%'],
itemStyle: {
normal: {
areaColor: {
type: 'linear-gradient',
x: 0,
y: 400,
x2: 0,
y2: 0,
colorStops: [{
offset: 0,
color: 'rgba(37,108,190,0.3)'
}, {
offset: 1,
color: 'rgba(15,169,195,0.3)'
}],
global: true
},
borderColor: '#4ecee6',
borderWidth: 1
}
2.如果上面是一致的 你可以下载低版本echarts
npm install echarts@4.1.0 --save