miniboxhaha opened a new issue #9943: 3D地球使用echarts 绘制世界地图的实例作为纹理时,飞线图经纬度坐标显示错误 URL: https://github.com/apache/incubator-echarts/issues/9943 使用echarts 绘制世界地图的实例作为纹理时,飞线图给定起点、终点经纬度与显示在地图上的位置不一致。使用真实贴图时结果正确。 测试地址:https://www.echartsjs.com/examples/editor.html?c=globe-echarts-gl-hello-world&gl=1 ```javascript var canvas = document.createElement('canvas'); var mapChart = echarts.init(canvas, null, { width: 4096, height: 2048 }); mapChart.setOption({ backgroundColor:{ type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: '#1E90FF' // 0% 处的颜色 }, { offset: 1, color: '#AFEEEE' // 100% 处的颜色 }], global: false // 缺省为 false }, series : [{ id: 'map', type: 'map', // mapType: 'world', map:'world', top: '10%', bottom: '30%', left: 10, slient:true, itemStyle: { normal: { areaColor:{ type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: ' #F5DEB3' // 0% 处的颜色 }, { offset: 1, color: '#fff' // 100% 处的颜色 }], global: false // 缺省为 false }, borderColor: '#404a59', shadowColor: 'black', shadowOffsetX: 1, shadowOffsetY: 1 }, emphasis:{ label:{ show:false }, areaColor:{ type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: ' #FFFFE0' // 0% 处的颜色 }, { offset: 1, color: ' #fff' // 100% 处的颜色 }], global: false // 缺省为 false }, borderColor: '#404a59' } }, } ] }); option = { backgroundColor: '#eeefff', globe: { baseTexture: mapChart,//飞线图位置不正确 // baseTexture: "data-gl/asset/world.topo.bathy.200401.jpg",//飞线图位置正确 displacementTexture: 'data-gl/asset/bathymetry_bw_composite_4k.jpg', shading: 'realistic', environment: '#eeefff', displacementScale: 0.07, realisticMaterial: { roughness: 0.1 }, postEffect: { enable: true }, viewControl:{ autoRotate:false, }, light: { ambient:{ intensity:1, color:'#eee' } } }, series: { type: 'lines3D', coordinateSystem: 'globe', blendMode: 'lighter', lineStyle: { width: 15, color: '#fff', opacity: 1 }, data: [ [ [116, 39, 1000], // 起点的经纬度和海拔坐标 [122, 67, 1000] // 终点的经纬度和海拔坐标 ] ] } }; ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
