echarts提示:Map xxx not exists. The GeoJSON of the map must be provided.
admin 阅读:131 2024-03-02
使用 echarts 时遇到浏览器错误:Map xxx not exists. The GeoJSON of the map must be provided.
遇到这个错误,首先检查一下 geo 中的 map 参数配置,是否跟引入的地图名称一致。
this.$echarts.registerMap('china', geoJson.data.data)geo: {
//使用 registerMap 注册的地图名称。
map: 'china',
label: {
show:false
},
aspectScale:0.5,
top:'10%',
roam: false,
itemStyle: {
areaColor: '#00196d',
borderColor: '#1773c3',
shadowColor: '#1773c3',
shadowBlur: 20
}
},如果检查一致,请使用低版本的 echarts。
npm install echarts@4.1.0 --save 声明
1、部分文章来源于网络,仅作为参考。 2、如果网站中图片和文字侵犯了您的版权,请联系1943759704@qq.com处理!



