Skip to content

Commit

Permalink
fix: fix pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tjur0 committed Oct 10, 2022
1 parent d65357f commit e29df01
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
18 changes: 6 additions & 12 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1014,17 +1014,13 @@ Layer:
table: |-
(SELECT
way,
COALESCE(layer,0) AS layernotnull,
tags->'roller_coaster' AS roller_coaster,
railway,
CASE WHEN (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') THEN 'yes' ELSE 'no' END AS tunnel,
CASE WHEN (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes' OR indoor = 'yes') THEN 'yes' ELSE 'no' END AS tunnel,
CASE WHEN (bridge = 'yes' OR bridge = 'covered' OR bridge = 'viaduct') THEN 'yes' ELSE 'no' END AS bridge
FROM planet_osm_line
WHERE railway IS NULL
WHERE tags->'roller_coaster' = 'track' AND railway IS NULL
) AS roller_coaster
properties:
group-by: layernotnull
minzoom: 14
minzoom: 15
- id: roller-coaster
geometry: linestring
<<: *extents
Expand All @@ -1034,17 +1030,15 @@ Layer:
(SELECT
way,
COALESCE(layer,0) AS layernotnull,
tags->'roller_coaster' AS roller_coaster,
railway,
CASE WHEN (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') THEN 'yes' ELSE 'no' END AS tunnel
CASE WHEN (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes' OR indoor = 'yes') THEN 'yes' ELSE 'no' END AS tunnel
FROM planet_osm_line
WHERE railway IS NULL
WHERE tags->'roller_coaster' = 'track' AND railway IS NULL
ORDER BY
layernotnull -- put bottom layered track first
) AS roller_coaster
properties:
group-by: layernotnull
minzoom: 14
minzoom: 15
- id: entrances
geometry: point
<<: *extents
Expand Down
27 changes: 20 additions & 7 deletions style/tourism.mss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@track-casing: #707070;
@track-fill: #ddd;

#roller-coaster-casing[roller_coaster = 'track'][zoom >= 14] {
#roller-coaster-casing[zoom >= 15] {
::bridges[bridge = 'yes'] {
line-width: 0.5 + 2*@casing-width-z14;
line-color: darken(@track-casing, 20%);
Expand All @@ -18,15 +18,14 @@
}

::casing {
line-width: 0.5;
line-width: 1;
line-color: mix(@track-casing, @track-fill, 50%);
line-join: round;
line-cap: round;

[tunnel = 'yes'][zoom >= 16] {
line-color: lighten(#707070, 20%);
}
[zoom >= 15] { line-width: 1; }
[zoom >= 16] {
line-color: @track-casing;
line-width: 2.5;
Expand All @@ -36,18 +35,32 @@
[zoom >= 19] { line-width: 8; }
[zoom >= 20] { line-width: 12; }
}

::fill[zoom >= 16] {
line-width: 1.25;
line-color: @track-fill;
line-join: round;
line-cap: round;

[tunnel = 'yes'] {
line-color: lighten(@track-fill, 5%);
}
[zoom >= 17] { line-width: 2; }
[zoom >= 18] { line-width: 3; }
[zoom >= 19] { line-width: 4; }
[zoom >= 20] { line-width: 6; }
}
}

#roller-coaster[roller_coaster = 'track'][zoom >= 14] {
#roller-coaster[zoom >= 15] {
::casing {
line-width: 0.5;
line-width: 1;
line-color: mix(@track-casing, @track-fill, 50%);
line-join: round;

[tunnel = 'yes'][zoom >= 16] {
line-color: lighten(#707070, 20%);
}
[zoom >= 15] { line-width: 1; }
[zoom >= 16] {
line-color: @track-casing;
line-width: 2.5;
Expand All @@ -59,9 +72,9 @@
}

::fill[zoom >= 16] {
line-width: 1.25;
line-color: @track-fill;
line-join: round;
line-width: 1.25;
line-dasharray: 2.5,0.5;

[tunnel = 'yes'] {
Expand Down

0 comments on commit e29df01

Please sign in to comment.