Open AnShengLI opened 6 years ago
通过canvas,创建china地图层,添加到map3d上,达不到效果
var canvas = document.createElement('canvas');
// 引入中国json数据
var chinaChart = echarts.init(canvas, null, {
width: 4096, height: 3048
});
$.get('./geo/china.json', function (map) {
echarts.registerMap('china', map);
chinaChart.setOption({
series: [{
name: '中国',
type: 'map',
aspectScale: 1.0,
roam: true,
map: 'china',
left: 0, top: 0, right: 0, bottom: 0,
boundingCoords: [
// 定位左上角经纬度
[-180, 90],
// 定位右下角经纬度
[180, -91]
],
label:{
normal:{
show:true,
color:'#fff',
fontSize:18
}
},
itemStyle:{
normal:{
areaColor:"rgba(0,0,52,0.9)"
}
}
}]
});
});
在以下引用图层 surfaceLayers:{ name: 'china', type:'texture', image: chinaChart },
如此为何出来不想要的效果,求解答。
请问china.json从哪里寻找,我找到的json数据china不显示,但是省份都是可以的,map3d和geo3d是同样的问题
require.config({ paths: { 'echarts': 'js', 'echarts-x': 'js' } });