echarts世界地图json 文件,自转地球
const chartCopyright = this.$echarts.init(document.getElementById('globe'))
var myChart = echarts.init(uploadword);
echarts.registerMap("word", { geoJSON: uploadword });
var option = {
backgroundColor: '#f4f4f4',//背景颜色
globe: {
// baseTexture: uploadword, // 基础纹理
globeRadius: 150, // 球面半径
baseTexture: this.url2,//地球的纹理
heightTexture: this.url,//地球的高度纹理
environment: '#000',
shading: 'color',
light: {
// 光照阴影部分
main: {
color: '#fff', // 光照颜色
intensity: 1, //强度
alpha: 40,
beta: -30,
},
ambient: {
color: '#fff',
intensity: 1,
},
},
viewControl: {
alpha: 30,
beta: 160,
autoRotate: true,
autoRotateAfterStill: 10,
distance: 240,
},
},
series: [
{
name: '',
type: 'lines3D',
coordinateSystem: 'globe',
effect: {
show: true,
period: 1, //尾迹特效的周期。
trailWidth: 3, //尾迹宽度
trailLength: 1, //尾迹的长度,
trailOpacity: 1,
trailColor: "#0ff420"
},
blendMode: 'lighter',
lineStyle: {
width: 1,
color: "#f4281a",
opacity: 1
},
data: this.lindata,
silent: false,
},
],
};
chartCopyright.setOption(option);
window.onresize = () => {
chartCopyright.resize();
};