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

Add rendering for straits mapped as linear ways #3733

Merged
merged 3 commits into from
Apr 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -2521,13 +2521,15 @@ Layer:
waterway,
lock,
name,
"natural",
tags-> 'lock_name' AS lock_name,
CASE WHEN tags->'intermittent' IN ('yes')
OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season')
THEN 'yes' ELSE 'no' END AS int_intermittent,
CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel
FROM planet_osm_line
WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'wadi')
WHERE (waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'wadi')
OR "natural" = 'strait')
AND (tunnel IS NULL or tunnel != 'culvert')
AND name IS NOT NULL
ORDER BY COALESCE(layer,0)
Expand Down
34 changes: 34 additions & 0 deletions water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,23 @@
}
}
}
[natural = 'strait'][zoom >= 14] {
text-name: "[name]";
text-size: 10;
text-face-name: @oblique-fonts;
text-fill: @water-text;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
text-max-char-angle-delta: 15;
text-spacing: 400;
text-placement: line;
[zoom >= 15] {
text-size: 12;
}
}
}


.text-low-zoom[zoom < 10],
.text[zoom >= 10] {
[feature = 'natural_water'],
Expand Down Expand Up @@ -353,3 +368,22 @@
}
}
}

#text-point[zoom >= 14] {
[feature = 'natural_strait'] {
text-name: "[name]";
text-size: 10;
text-wrap-width: 25; // 2.5 em
text-line-spacing: -1.5; // -0.15 em
text-fill: @water-text;
text-face-name: @oblique-fonts;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
text-placement: point;
[zoom >= 15] {
text-size: 12;
text-wrap-width: 37; // 3.1 em
text-line-spacing: -1.6; // -0.13 em
}
}
}