-
Notifications
You must be signed in to change notification settings - Fork 825
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
Adding rendering for place=quarter #3223
Conversation
Another example (Osse) - this time together with a village (Gąsówka-Osse) and a hamlet (Buczycha): |
placenames.mss
Outdated
[zoom >= 14] { | ||
text-halo-fill: white; | ||
text-size: 11; | ||
text-wrap-width: 65; // 5.0 em |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
em can be interpreted a short-hand for the current text-size
, which is here 11
. So:
- If
text-wrap-width: 65
is what you want, than you have 65 ÷ (11 em⁻¹) ≈ 5.9 em for the comment. - If
// 5.0 em
is what you want, than you have 5.0 em × 11 em⁻¹ = 55 for the “text‑wrap‑width” value.
I would always recommend to start by defining the em values in the comments, and than simply calculate the real values.
placenames.mss
Outdated
text-halo-fill: white; | ||
text-size: 11; | ||
text-wrap-width: 65; // 5.0 em | ||
text-line-spacing: -0.65; // -0.05 em |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, // -0.05 em
is reasonable for a text‑wrap‑width of 5.0 em. The absolute value is than −0.05 em × 11 em⁻¹ = −0.55
placenames.mss
Outdated
text-size: 11; | ||
text-wrap-width: 65; // 5.0 em | ||
text-line-spacing: -0.65; // -0.05 em | ||
text-margin: 9.1; // 0.7 em |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// -0.7 em
is good. The absolute value is than 0.7 em × 11 em⁻¹ = 7.7
placenames.mss
Outdated
text-margin: 9.8; // 0.7 em | ||
} | ||
[zoom >= 16] { | ||
text-size: 14; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the em
value as starting point, the following text-wrap-width
, text-line-spacing
and text-margin
absolute values would have to be recalculated for 14 em⁻¹.
placenames.mss
Outdated
} | ||
[zoom >= 15] { | ||
text-fill: @placenames-light; | ||
text-size: 12; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the em
value as starting point, the following text-wrap-width
, text-line-spacing
and text-margin
absolute values would have to be recalculated for 12 em⁻¹.
@sommerluk Thanks for spotting, this was just a brute force copy-paste with some general tuning. I will update it. BTW: If you think https://github.com/gravitystorm/openstreetmap-carto/blob/master/CONTRIBUTING.md#multi-line-labels could be improved somehow, please do so. |
We could also think about hamlet rendering - it was proposed lately to move it to z14+ and it looks good to me (see #1984). I guess this is not the most important thing that quarter should start earlier than hamlet, but maybe somebody has some comments regarding this? |
@sommerluk Code is updated. |
text-size, text-wrap-width, text-line-spacing, text-margin: seems fine to me now. |
Any other comments or reviews? |
Rendering is fine for me in general, given the usage. |
sent from a phone
On 14. May 2018, at 09:15, polarbearing ***@***.***> wrote:
The tag definition "bigger than place=neighbourhood" is a bit vague, since there is no clear size definition for neighbourhood to start with.
it is about a local/regional hierarchy. It doesn’t matter how big a neighbourhood is, the quarter will be bigger than the neighbourhoods around/within.
|
ok that sounds reasonable. |
Fixes #798
Changes proposed in this pull request:
Rendering test:
z14
z15
z16