-
-
Notifications
You must be signed in to change notification settings - Fork 6k
add {r} format to url, which returns @2x when retina detected and enabled #2296
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
Conversation
|
I'm not sure - it's Apple's recommendation of a prefix/postfix, but there are providers like CloudMade that do something entirely different, and it's not always upscaled 256 tiles but sometimes 512 tiles. Seems a bit tricky / potentially not ready for a future standard. |
|
@tmcw CloudMade also uses It doesn't take too much code so we could include it just for convenience, even if it's not a standard. |
|
@jieter @calvinmetcalf what are your thoughts on this guys? |
|
add options for |
|
@calvinmetcalf looks a bit verbose, do you know any tile provider that utilizes non-@2x convention for retina? |
|
I should have more clearly pointed out that those were top of my head names I thought were terrible, as far as I know nobody does use anything else or sets a flag for non retina etc, but hard coding it without adding an option to change it from the default seems like the kind of thing which we might regret latter |
|
Well, I think it's better to add it later than prematurely solve non-existing problems with more code. So good to merge then? |
|
my bad I didn't notice it was a pull request and not an issue so thought we were brainstorming, yeah that's fine |
|
@calvinmetcalf that kind of input is always good in any case, be it pull or issue. |
add {r} format to url, which returns @2x when retina detected and enabled
you can use {r} in tileLayer url, to serve different tiles (2x ones) for retina screens, cause the current detectRetina implementation makes the labels in tiles too small