Skip to content

Commit

Permalink
Merge pull request #2594 from nebulon42/water-tunnel-casing
Browse files Browse the repository at this point in the history
use land-color as background for waterway tunnels
  • Loading branch information
pnorman authored May 8, 2017
2 parents eee2c4a + 970df74 commit 850c3fd
Showing 1 changed file with 73 additions and 35 deletions.
108 changes: 73 additions & 35 deletions water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@
[waterway = 'canal'][zoom >= 12],
[waterway = 'river'][zoom >= 12],
[waterway = 'wadi'][zoom >= 13] {
// the additional line of land color is used to provide a background for dashed casings
[int_tunnel = 'yes'] {
background/line-color: @land-color;
background/line-width: 2;
background/line-cap: round;
background/line-join: round;
}
water/line-color: @water-color;
water/line-width: 2;
water/line-cap: round;
water/line-join: round;

[bridge = 'yes'] {
[zoom >= 14] {
bridgecasing/line-color: black;
Expand All @@ -106,6 +118,7 @@
[zoom >= 18] { bridgecasing/line-width: 13; }
}
}

[intermittent = 'yes'],
[waterway = 'wadi'] {
[bridge = 'yes'][zoom >= 14] {
Expand All @@ -116,37 +129,51 @@
[zoom >= 17] { bridgefill/line-width: 9; }
[zoom >= 18] { bridgefill/line-width: 11; }
}
line-dasharray: 4,3;
line-cap: butt;
line-join: round;
line-clip: false;
water/line-dasharray: 4,3;
water/line-cap: butt;
water/line-join: round;
water/line-clip: false;
}
line-color: @water-color;
line-width: 2;
[zoom >= 13] { line-width: 3; }
[zoom >= 14] { line-width: 5; }
[zoom >= 15] { line-width: 6; }
[zoom >= 17] { line-width: 10; }
[zoom >= 18] { line-width: 12; }
line-cap: round;
line-join: round;

[zoom >= 13] { water/line-width: 3; }
[zoom >= 14] { water/line-width: 5; }
[zoom >= 15] { water/line-width: 6; }
[zoom >= 17] { water/line-width: 10; }
[zoom >= 18] { water/line-width: 12; }

[int_tunnel = 'yes'] {
line-dasharray: 4,2;
line-cap: butt;
line-join: miter;
a/line-color: #f3f7f7;
a/line-width: 1;
[zoom >= 14] { a/line-width: 2; }
[zoom >= 15] { a/line-width: 3; }
[zoom >= 17] { a/line-width: 7; }
[zoom >= 18] { a/line-width: 8; }
[zoom >= 13] { background/line-width: 3; }
[zoom >= 14] { background/line-width: 5; }
[zoom >= 15] { background/line-width: 6; }
[zoom >= 17] { background/line-width: 10; }
[zoom >= 18] { background/line-width: 12; }

water/line-dasharray: 4,2;
background/line-cap: butt;
background/line-join: miter;
water/line-cap: butt;
water/line-join: miter;
tunnelfill/line-color: #f3f7f7;
tunnelfill/line-width: 1;
[zoom >= 14] { tunnelfill/line-width: 2; }
[zoom >= 15] { tunnelfill/line-width: 3; }
[zoom >= 17] { tunnelfill/line-width: 7; }
[zoom >= 18] { tunnelfill/line-width: 8; }
}
}

[waterway = 'stream'],
[waterway = 'ditch'],
[waterway = 'drain'] {
[zoom >= 13] {
// the additional line of land color is used to provide a background for dashed casings
[int_tunnel = 'yes'] {
background/line-width: 2;
background/line-color: @land-color;
}
water/line-width: 2;
water/line-color: @water-color;

[bridge = 'yes'] {
[zoom >= 14] {
bridgecasing/line-color: black;
Expand All @@ -159,24 +186,35 @@
[waterway = 'stream'][zoom >= 15] { bridgeglow/line-width: 3; }
}
}

[intermittent = 'yes'] {
line-dasharray: 4,3;
line-cap: butt;
line-join: round;
line-clip: false;
water/line-dasharray: 4,3;
water/line-cap: butt;
water/line-join: round;
water/line-clip: false;
background/line-cap: butt;
background/line-join: round;
background/line-clip: false;
}
line-width: 2;
line-color: @water-color;

[waterway = 'stream'][zoom >= 15] {
line-width: 3;
water/line-width: 3;

[int_tunnel = 'yes'] {
background/line-width: 3;
}
}
[int_tunnel = 'yes'][zoom >= 15] {
line-width: 3.5;
[waterway = 'stream'] { line-width: 4.5; }
line-dasharray: 4,2;
a/line-width: 1;
[waterway = 'stream'] { a/line-width: 2; }
a/line-color: #f3f7f7;
background/line-width: 3.5;
water/line-width: 3.5;
[waterway = 'stream'] {
background/line-width: 4.5;
water/line-width: 4.5;
}
water/line-dasharray: 4,2;
tunnelfill/line-width: 1;
[waterway = 'stream'] { tunnelfill/line-width: 2; }
tunnelfill/line-color: #f3f7f7;
}
}
}
Expand Down

0 comments on commit 850c3fd

Please sign in to comment.