echarts geo地圖坐標轉換為頁面Offset坐標


https://github.com/apache/incubator-echarts/issues/2540

 

代碼示例:

// 獲取系列
var seriesModel = myChart.getModel().getSeriesByIndex(opts.series.length - 1)
// 獲取地理坐標系實例
var coordSys = seriesModel.coordinateSystem;
// dataToPoint 相當於 getPosByGeo
var point = coordSys.dataToPoint([current.lng, current.lat]);
// 直接顯示layer
showkeySupervision__layer(point[0], point[1], current)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM