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

Water slide #3346

Merged
merged 2 commits into from
Aug 21, 2018
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
33 changes: 33 additions & 0 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -2901,6 +2901,39 @@
marker-file: url('symbols/transport_slipway.p.20.svg');
marker-fill: @transportation-icon;
}

[feature = 'attraction_water_slide'] {
[zoom >= 16] {
[zoom >= 17] {
bridgecasing/line-color: black;
bridgecasing/line-join: round;
bridgecasing/line-smooth: 1;
bridgecasing/line-width: 1.25;
[zoom >= 18] { bridgecasing/line-width: 2.5; }
[zoom >= 19] { bridgecasing/line-width: 5; }
}
line-color: @pitch;
line-join: round;
line-cap: round;
line-smooth: 1;
line-width: 1;
[zoom >= 18] { line-width: 2; }
[zoom >= 19] { line-width: 4; }

[zoom >= 19] {
text-name: "[name]";
text-size: 10;
text-face-name: @oblique-fonts;
text-fill: darken(@pitch, 40%);
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
text-placement: line;
text-vertical-alignment: middle;
text-repeat-distance: @waterway-text-repeat-distance;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this is not needed for such short features.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to remove it, but then I got the name twice even on quite short slides.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see - surprising side effect. 😄

text-dy: 8;
}
}
}
}

#trees [zoom >= 16] {
Expand Down
5 changes: 4 additions & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1563,14 +1563,17 @@ Layer:
table: |-
(SELECT
way,
name,
COALESCE(
'highway_' || CASE WHEN tags @> 'ford=>yes' OR tags @> 'ford=>stepping_stones' THEN 'ford' ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('slipway') THEN leisure ELSE NULL END
'leisure_' || CASE WHEN leisure IN ('slipway') THEN leisure ELSE NULL END,
'attraction_' || CASE WHEN tags @> 'attraction=>water_slide' THEN 'water_slide' ELSE NULL END
) AS feature
FROM planet_osm_line
-- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering
WHERE tags @> 'ford=>yes' OR tags @> 'ford=>stepping_stones'
OR leisure IN ('slipway')
OR tags @> 'attraction=>water_slide'
) AS amenity_line
properties:
minzoom: 16
Expand Down