You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/10/31 09:50:10 UTC

[GitHub] [incubator-echarts] 18124772589 opened a new issue #11539: geo3D可以主动用Js控制缩放的大小以及平移的位置吗

18124772589 opened a new issue #11539: geo3D可以主动用Js控制缩放的大小以及平移的位置吗
URL: https://github.com/apache/incubator-echarts/issues/11539
 
 
   let option = {
                   geo3D: {
                       map: 'china',
                       top: '30%',
                       itemStyle: {
                           color: 'rgb(133, 95, 5)',
                           opacity: 0.3,
                           borderWidth: 1,
                           borderColor: 'rgba(155, 129, 31, 0.8)'
                       },
                       // static/common/mapBg.png
                       // https://www.echartsjs.com/examples/data-gl/asset/starfield.jpg
                       // environment: 'https://www.echartsjs.com/examples/data-gl/asset/starfield.jpg',
                       viewControl: {
                           // projection: 'orthographic',
                           autoRotate: true,
                           distance: 130,
                           // rotateSensitivity: [1, 0],
                           autoRotateDirection: 'cw',
                           autoRotateSpeed: 15,
                           // autoRotateAfterStill: 0,
                           alpha: 60,
                           minAlpha: 60,
                           maxAlpha: 60,
                           beta: -30,
                           minBeta: -30,
                           maxBeta: 30,
                           center: [30, 0, 40],
                       },
                       light: { //光照阴影
                           main: {
                               color: '#fff', //光照颜色
                               intensity: 1.2, //光照强度
                               //shadowQuality: 'high', //阴影亮度
                               shadow: false, //是否显示阴影
                               // alpha: 55,
                               // beta: 10
                           },
                           ambient: {
                               intensity: 0.3
                           }
                       },
                   },
                   series: [
                       //画线
                       {
                           type: 'lines3D',
                           coordinateSystem: 'geo3D',
                           // blendMode: 'lighter',
                           effect: {
                               show: true,
                               period: 6, //箭头指向速度,值越小速度越快
                               trailWidth: 2,
                               trailLength: 0.2, //特效尾迹长度[0,1]值越大,尾迹越长重
                               symbol: '', //箭头图标
                               symbolSize: 1, //图标大小
                           },
                           lineStyle: {
                               normal: {
                                   color: 'rgb(252, 184, 19)',
                                   width: 0, //尾迹线条宽度
                                   opacity: 0.5, //尾迹线条透明度
                                   curveness: 0.5 //尾迹线条曲直度
                               }
                           },
                           data: list.alirl
                       },
                       // 公司的点
                       {
                           type: 'scatter3D',
                           coordinateSystem: 'geo3D',
                           symbol: 'circle',
                           symbolSize: 10,
                           itemStyle: {
                               normal: {
                                   show: false,
                                   color: 'rgb(252, 184, 19)'
                               }
                           },
                           data: list.alirl.reduce((sum, current) => {
                               sum.push({value: current[1]})
                               return sum
                           }, [])
                       },
                       // 项目的点
                       {
                           type: 'scatter3D',
                           coordinateSystem: 'geo3D',
                           symbol: 'triangle',
                           symbolSize: 4,
                           itemStyle: {
                               normal: {
                                   color: 'rgb(252, 184, 19)'
                               }
                           },
                           data: list.alirl.reduce((sum, current) => {
                               sum.push({value: current[0]})
                               return sum
                           }, [])
                       }
                   ]
               }
               myChart.setOption(option)
               myChart.on('geo3dcamerachanged', function (params) {
                   console.log("geo3dcamerachanged............", params)
               })
   
   geo3D希望在旋转中能主动用Js控制缩放的大小以及平移的位置,有实现方法吗?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org