Skip to content

Commit

Permalink
Change junction rendering
Browse files Browse the repository at this point in the history
* Also render name for traffic_signals without junction tag
* Don't render junction names on roundabouts
* Render junctions in black and in a smaller font
* Offset junction names only when the traffic signal icon shows
* Start rendering junctions from z14
* Wrap lines
  • Loading branch information
matthijsmelissen committed Aug 6, 2014
1 parent d59278f commit 9c6b161
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@
],
"Datasource": {
"type": "postgis",
"table": " (select way,highway,junction,ref,name\n from planet_osm_point\n where highway='motorway_junction' or NOT junction IS NULL\n ) as junctions",
"table": " (select way,highway,junction,ref,name\n from planet_osm_point\n where highway='motorway_junction' or highway = 'traffic_signals' or junction = 'yes'\n ) as junctions",
"extent": "-20037508,-20037508,20037508,20037508",
"key_field": "",
"geometry_field": "way",
Expand Down
34 changes: 21 additions & 13 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1759,20 +1759,28 @@
}

[junction = 'yes'],
[junction = 'roundabout'] {
[zoom >= 13] {
name/text-name: "[name]";
name/text-size: 9;
name/text-fill: #6666ff;
name/text-dy: -9;
name/text-face-name: @oblique-fonts;
name/text-halo-radius: 1;
name/text-wrap-character: ";";
name/text-wrap-width: 2;
name/text-min-distance: 2;
[highway = 'traffic_signals'] {
[zoom >= 14] {
text-name: "[name]";
text-size: 8;
text-fill: black;
text-face-name: @book-fonts;
text-halo-radius: 1;
text-wrap-width: 30;
text-min-distance: 2;
[zoom >= 14] {
text-size: 9;
}
[zoom >= 15] {
name/text-size: 11;
name/text-dy: -10;
text-size: 10;
}
[zoom >= 17] {
text-size: 11;
/* Offset name on traffic_signals on zoomlevels where they are displayed
in order not to hide the icon */
[highway = 'traffic_signals'] {
text-dy: 11;
}
}
}
}
Expand Down

0 comments on commit 9c6b161

Please sign in to comment.