Skip to content

Commit

Permalink
use land-color as background for waterway dashes
Browse files Browse the repository at this point in the history
  • Loading branch information
nebulon42 committed Apr 2, 2017
1 parent 8be18f0 commit 39d45c7
Showing 1 changed file with 75 additions and 35 deletions.
110 changes: 75 additions & 35 deletions water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,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 @@ -113,6 +125,7 @@
[zoom >= 18] { bridgecasing/line-width: 13; }
}
}

[intermittent = 'yes'],
[waterway = 'wadi'] {
[bridge = 'yes'][zoom >= 14] {
Expand All @@ -123,37 +136,53 @@
[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; }
}

[int_tunnel = 'yes'] {
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 @@ -166,24 +195,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 39d45c7

Please sign in to comment.