-
Notifications
You must be signed in to change notification settings - Fork 819
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
Fixing country labels on z4 #3353
Conversation
this has been deployed and z3-z4 rerendered. |
Thanks! Testing link (positions might be different, since OSMF servers use new Mapnik with different labels placing algorithm): All the missing country labels on z4 are now visible (the names of islands indicate that we're really on z4): |
To be honest, I prefer the old rendering. There was a reason not to render labels on such huge areas: it is really hard to see what area the label belongs to. Especially because the label is so small compared to the country. And if we're already zoomed in so far, I'm not even sure if users are still interested in the country name. |
Yes, I remember your position and I understand it. For me such a large area without even a single label lacks consistency. The zoom-in logic for me is following: a blank page -> country names level -> states names level. Without this fix there's a blank page between "country level" (z3) and "states level" (z5) and for me it's disturbing. |
Quoting from #2851 (comment):
I agree with this sentence. Yes, I know what country it is. My problem is that on z4 the are no smaller details yet (they are rendered from z5) and this gap is strange for me. Only 2-3 countries behave like that and it seems like special exception: we have plenty of space for rendering, but we abstain from it. |
Another thing that I just saw: without country labels cities like Moscow or Ottawa lack some context for that name (there are only country boundaries). |
I see also similar problem with some Russian states: they should be visible from z5, but they are too big already, so their name is never shown, even if we have plenty of space. And there are also capitals inside them which lack some context. Example - Krasnoyarsk Krai: https://www.openstreetmap.org/relation/190090#map=5/70.656/99.031 |
My current code has a side effect that the name of a "big" country is rendered even on z4+. Could somebody help me to fix it? |
Also on z5 for small countries, the condition [zoom >= 3][way_pixels > 1000] is true. Maybe you should start with something like [zoom >= 3][zoom < 5][way_pixels > 1000], [zoom >= 5][way_pixels < 360000]. |
Thanks, @matthijsmelissen, this sounds like a good solution. @rrzefox Could you apply the fixed code? |
the current version of this PR has been deployed and Z2-Z6 rerendered. |
Thanks! On z2-z6 it works OK, I will test it also on higher levels to know if country labels on z5+ are disappearing properly. |
Fixes #2851
Changes proposed in this pull request:
@rrzefox Could you test this fix on your server?