-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Detect retina displays and adjust tileSize accordingly #586
Conversation
…ixelRatio is undefined
…like city titles) from being too small to read on retinal tiles
|
@Mithgol this passes lint (and should be fine unless
basically if you can avoid bitwise operators in JS it is better since they are a) obscure and b) inefficient |
@Mithgol also when testing this (I merged it into leaflet's current master, here is the leaflet-src.js I compiled) I believe it is generating incorrect tile urls. using:
leaflet generates requests for tiles at URLs such as:
which isn't a valid tile URL, though up one zoom level is:
any ideas on why this is happening? |
figured it out - you were using
|
additionally we might want to check for |
Are there any devices with non-integer And if there are, what are their |
I believe android devices come in flavors of 0.75px, 1.0px, 1.5px and 2.0px (ratio |
I'd just double tile pixel ratio for And my pull request already does all that (it activates only when |
@Mithgol that makes sense -- I think I was overthinking the problem :D |
@mourner +1'ing this pull req |
Sorry for such a delay, I'll certainly merge this into master in the next couple of days. |
While you are at it, please check whether I should have taken |
That's not a couple of days — more like a couple of dozens. Please provide a new estimated date of landing. |
Detect retina displays and adjust tileSize accordingly
Hi there, |
Thanks! I'll do a proper build with all the recently merged pulls today (needed to sort out some things in the code before). |
Updated the build. |
@Mithgol thanks again! |
Завсегда пожалуйста. |
Should fix CloudMade/Leaflet#582.
Related external links: