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

地图进行scale放大,导致地图模糊 #869

Closed
wuhandamowang opened this issue Feb 27, 2019 · 4 comments
Closed

地图进行scale放大,导致地图模糊 #869

wuhandamowang opened this issue Feb 27, 2019 · 4 comments

Comments

@wuhandamowang
Copy link

@fuzhenn 付镇老哥好,项目里面现在试图用scale的方式放大(2倍)地图解决容器太大带来的性能问题,但是会导致canvas严重模糊。echarts可以通过设置devicePixelRatio解决此类问题,想问问付镇老哥咱们的地图能不能也通过这个方式来进行优化(有尝试调整源码中的devicePixelRatio,但是没有生效)。谢谢!

@wuhandamowang wuhandamowang changed the title 大屏开发对地图进行Y轴方向放大导致点击地图上的polygon点击错位 Feb 27, 2019
@fuzhenn
Copy link
Member

fuzhenn commented Feb 27, 2019

收到,能否帮忙写个jsfiddle给我?我好复现一下这个问题,并尝试改进一下

@wuhandamowang
Copy link
Author

因为网络问题我这边用jsrun方便一点
http://jsrun.net/a2XKp/edit 这个地址是复现地图放大变模糊的情况,从地图到几何图形到文字都出现模糊的情况
http://jsrun.net/32XKp/edit 这个地址是复现echarts通过设置devicePixelRatio参数解决容器放大造成的canvas模糊的场景
麻烦付老师看一下,谢谢

fuzhenn added a commit that referenced this issue Apr 5, 2019
@fuzhenn fuzhenn closed this as completed in fcf01e4 Apr 5, 2019
@fuzhenn
Copy link
Member

fuzhenn commented Apr 5, 2019

该功能已经添加,增加了devicePixelRatio设置:

const map = new maptalks.Map('map', {
  //....
  devicePixelRatio: 2
});
@wuhandamowang
Copy link
Author

OK,试过了,没有问题。
谢谢付老师!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants