Skip to content

Commit

Permalink
Give road labels a halo in the respective road-fill color
Browse files Browse the repository at this point in the history
* This increases the legibility of labels in certain cases, for example on level crossings
* This enables #1007 (allow collisions with some symbols)
  • Loading branch information
matthijsmelissen committed Oct 4, 2014
1 parent 555c868 commit e2d0985
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@service-fill: @residential-fill;
@living-street-fill: #ccc;
@pedestrian-fill: #ededed;
@raceway-fill: pink;
@road-fill: #ddd;
@path-fill: black;
@footway-fill: salmon;
Expand Down Expand Up @@ -1033,7 +1034,7 @@

[feature = 'highway_raceway'] {
[zoom >= 12] {
line-color: pink;
line-color: @raceway-fill;
line-width: 1.2;
line-join: round;
line-cap: round;
Expand Down Expand Up @@ -2099,7 +2100,10 @@
text-clip: false;
text-placement: line;
text-face-name: @book-fonts;
text-halo-radius: 0;
text-halo-radius: 1;
[highway = 'motorway'] { text-halo-fill: @motorway-fill; }
[highway = 'trunk'] { text-halo-fill: @trunk-fill; }
[highway = 'primary'] { text-halo-fill: @primary-fill; }
}
[zoom >= 14] {
text-size: 9;
Expand All @@ -2120,7 +2124,8 @@
text-clip: false;
text-placement: line;
text-face-name: @book-fonts;
text-halo-radius: 0;
text-halo-radius: 1;
text-halo-fill: @secondary-fill;
}
[zoom >= 14] {
text-size: 9;
Expand All @@ -2142,7 +2147,8 @@
text-clip: false;
text-placement: line;
text-face-name: @book-fonts;
text-halo-radius: 0;
text-halo-radius: 1;
text-halo-fill: @tertiary-fill;
}
[zoom >= 17] {
text-size: 11;
Expand Down Expand Up @@ -2174,7 +2180,8 @@
text-spacing: 300;
text-clip: false;
text-placement: line;
text-halo-radius: 0;
text-halo-radius: 1;
text-halo-fill: @residential-fill;
text-face-name: @book-fonts;
}
[zoom >= 16] {
Expand All @@ -2195,7 +2202,9 @@
text-spacing: 300;
text-clip: false;
text-placement: line;
text-halo-radius: 0;
text-halo-radius: 1;
[highway = 'raceway'] { text-halo-fill: @raceway-fill; }
[highway = 'service'] { text-halo-fill: @service-fill; }
text-face-name: @book-fonts;
}
[zoom >= 17] {
Expand All @@ -2212,7 +2221,9 @@
text-spacing: 300;
text-clip: false;
text-placement: line;
text-halo-radius: 0;
text-halo-radius: 1;
[highway = 'living_street'] { text-halo-fill: @living-street-fill; }
[highway = 'pedestrian'] { text-halo-fill: @pedestrian-fill; }
text-face-name: @book-fonts;
}
[zoom >= 16] {
Expand Down

0 comments on commit e2d0985

Please sign in to comment.