mingzichongfu opened a new issue #12055: 在geo中放入2层地图,地图监听georoam 缩放拖拽地图,下层地图跟随上层位置编号 URL: https://github.com/apache/incubator-echarts/issues/12055 ### Version 4.5.0 ### Steps to reproduce 我在geo中添加了2个地图,通过layoutCenter设置错开了一点距离,监听georoam事件,想要在缩放和拖拽上层地图时,底层也跟随着位置变化。代码如下 this.myChart.on("georoam",params=>{ //console.log(params) let option = this.myChart.getOption(); //console.log(option) if(params.zoom!=null&¶ms.zoom!=undefined){ //捕捉到缩放时 option.geo[1].zoom=option.geo[0].zoom;//下层geo的缩放等级跟着上层的geo一起改变 option.geo[1].center=option.geo[0].center;//下层的geo的中心位置随着上层geo一起改变 }else{//捕捉到拖曳时 option.geo[1].center=option.geo[0].center;//下层的geo的中心位置随着上层geo一起改变 } this.myChart.setOption(option,true);//设置option //this.myChart.resize(); }) ### What is expected? 缩放和拖拽上层,下层地图跟随变化 ### What is actually happening? 缩放时下层随上层的位置变化正确了,但是拖拽没有效果 --- 另外有一点想请教拖拽触发georoam事件中的dx dy分别代表什么 <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
