Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

百度地图 作为底图时经纬度坐标转换为像素坐标,目前的echarts实例convertToPixel 方法不管用 #13851

Closed
minren118 opened this issue Dec 21, 2020 · 5 comments

Comments

@minren118
Copy link

Version

5.0.0

Steps to reproduce

在作以百度地图为底图的散点地图,想在散点基础上加上饼图,饼图需要定位像素坐标,只找到geo的经纬度坐标转像素坐标的方法。没有找到百度地图转像素坐标的实现方式 。
最终用echarts实例方法convertToPixel去转时提示以下错误。

echarts.js:30281 No coordinate system that supports convertToPixel found by the given finder.

What is expected?

百度地图 作为底图时经纬度坐标转换为像素坐标,能够在ECharts绘图中使用。

What is actually happening?

未找到百度地图 作为底图时经纬度坐标转换为像素坐标的方法

@echarts-bot
Copy link

echarts-bot bot commented Dec 21, 2020

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Dec 21, 2020
@pissang pissang added enhancement and removed bug pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Dec 21, 2020
@plainheart
Copy link
Member

目前可以使用

chart.getModel().getComponent('bmap').coordinateSystem.dataToPoint([120, 30])

将经纬度转为像素坐标。
或者拿到百度地图实例之后,自行调用其提供的 pointToOverlayPixelpointToPixel API 转换。

@minren118
Copy link
Author

minren118 commented Dec 21, 2020 via email

@plainheart
Copy link
Member

chart.getModel().getComponent('bmap').getBMap();

@joel785454405
Copy link

昨天晚上刚好遇到相同的问题,要用到这个方法,谢谢楼主

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants