Skip to content

Commit

Permalink
Render attraction=water_slide (gravitystorm#3335).
Browse files Browse the repository at this point in the history
  • Loading branch information
johsin18 committed Aug 14, 2018
1 parent 236a903 commit 1dc491e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions openstreetmap-carto.style
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ node,way admin_level text linear
node,way aerialway text linear
node,way aeroway text polygon
node,way amenity text polygon
node,way attraction text polygon
node,way barrier text linear
way bicycle text linear
way bridge text linear
Expand Down
12 changes: 8 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,17 @@ Layer:
(SELECT
way,
waterway,
attraction,
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,
'no' AS bridge
FROM planet_osm_line
WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'wadi')
AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct'))
WHERE (waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'wadi')
AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct')))
OR attraction IN ('water_slide')
ORDER BY COALESCE(layer,0)
) AS water_lines
properties:
Expand Down Expand Up @@ -1009,15 +1011,17 @@ Layer:
(SELECT
way,
waterway,
attraction,
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,
'yes' AS bridge
FROM planet_osm_line
WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'wadi')
AND bridge IN ('yes', 'aqueduct')
WHERE (waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'wadi')
AND bridge IN ('yes', 'aqueduct'))
OR attraction IN ('water_slide')
ORDER BY COALESCE(layer,0)
) AS waterway_bridges
properties:
Expand Down
17 changes: 17 additions & 0 deletions water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,23 @@
}
}

[attraction = 'water_slide'] {
[zoom >= 15] {
[zoom >= 17] {
bridgecasing/line-color: saturate(darken(@water-color, 40%), 30%);
bridgecasing/line-join: round;
bridgecasing/line-width: 2;
[zoom >= 18] { bridgecasing/line-width: 3.5; }
[zoom >= 19] { bridgecasing/line-width: 7; }
}
water/line-color: @water-color;
water/line-width: 1;
water/line-join: round;
[zoom >= 17] { water/line-width: 1.5; }
[zoom >= 18] { water/line-width: 3; }
[zoom >= 19] { water/line-width: 6; }
}
}
}

#water-lines-text {
Expand Down

0 comments on commit 1dc491e

Please sign in to comment.