sxmpasch commented on issue #9392: geojson生成的地图,如何在地图上点击获取经纬度
URL: 
https://github.com/apache/incubator-echarts/issues/9392#issuecomment-438317074
 
 
   Take as example 
https://ecomfe.github.io/echarts-examples/public/editor.html?c=map-usa  
   and add an event handler:
   
   以https://ecomfe.github.io/echarts-examples/public/editor.html?c=map-usa为例
   并添加一个事件处理程序:
   
   ```
       myChart.on('click',function(e){
           let x=e.event.event.zrX;
           let y=e.event.event.zrY;
          console.log(myChart.convertFromPixel({seriesIndex:0},[x,y]));
       });
   
   ```
   This example prints latitude and longitude on the console...
   
   

----------------------------------------------------------------
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]

Reply via email to