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

地图绘制比例 视角错误 #3446

Closed
1 task done
Mamba-working opened this issue May 27, 2021 · 3 comments
Closed
1 task done

地图绘制比例 视角错误 #3446

Mamba-working opened this issue May 27, 2021 · 3 comments

Comments

@Mamba-working
Copy link

Mamba-working commented May 27, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

App.js中如果Area如果为空,则中国地图比例和视角错误,如果改成山东则比例和视角正确

Environment Info
g2 3.2.6
System mac os
Browser Edge 版本 90.0.818.62 (官方内部版本) (64 位)

希望在Area字段无法映射的时候也可以保证地图比例正确
image
image

@hustcc
Copy link
Member

hustcc commented May 31, 2021

原因是:地图的布局,会根据画布的大小自适应,所以如果要保持地图不压缩形变,可以让画布的宽高固定,且保持一个相对协调的比例。

@Mamba-working
Copy link
Author

原因是:地图的布局,会根据画布的大小自适应,所以如果要保持地图不压缩形变,可以让画布的宽高固定,且保持一个相对协调的比例。

画布大小指的是canvas的宽高嘛?目前canvas大小已经指定了width height。

@hustcc
Copy link
Member

hustcc commented Jun 11, 2021

原因是:地图的布局,会根据画布的大小自适应,所以如果要保持地图不压缩形变,可以让画布的宽高固定,且保持一个相对协调的比例。

画布大小指的是canvas的宽高嘛?目前canvas大小已经指定了width height。

是的~

@hustcc hustcc closed this as completed Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants