Skip to content

Commit

Permalink
use parameters of road type for text rendering of roads under constru…
Browse files Browse the repository at this point in the history
…ction, fixes gravitystorm#2477
  • Loading branch information
nebulon42 committed Mar 23, 2017
1 parent 8be18f0 commit fe745ff
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 4 deletions.
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,7 @@ Layer:
way,
CASE WHEN substr(highway, length(highway)-3, 4) = 'link' THEN substr(highway, 0, length(highway)-4) ELSE highway END,
CASE WHEN (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') THEN 'yes' ELSE 'no' END AS tunnel,
CASE WHEN construction IN ('service', 'footway', 'cycleway', 'bridleway', 'path', 'track') THEN 'yes' ELSE 'no' END AS int_construction_minor,
construction,
name,
CASE
WHEN oneway IN ('yes', '-1') THEN oneway
Expand Down
58 changes: 55 additions & 3 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -2839,22 +2839,74 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
}
}
[highway = 'construction'] {
[int_construction_minor = 'no'][zoom >= 13],
[int_construction_minor = 'yes'][zoom >= 14] {
[construction = 'motorway'][zoom >= 13],
[construction = 'trunk'][zoom >= 13],
[construction = 'primary'][zoom >= 13],
[construction = 'secondary'][zoom >= 13],
[construction = 'tertiary'][zoom >= 14],
[construction = 'residential'][zoom >= 15],
[construction = 'unclassified'][zoom >= 15],
[construction = 'road'][zoom >= 15],
[construction = 'living_street'][zoom >= 15],
[construction = 'pedestrian'][zoom >= 15],
[construction = 'raceway'][zoom >= 16],
[construction = 'service'][zoom >= 16],
[construction = 'track'][zoom >= 15],
[construction = 'bridleway'][zoom >= 16],
[construction = 'footway'][zoom >= 16],
[construction = 'cycleway'][zoom >= 16],
[construction = 'path'][zoom >= 16],
[construction = 'steps'][zoom >= 16],
[construction = null][zoom >= 16] {
text-name: "[name]";
text-size: 9;
text-size: 8;
text-fill: black;
text-spacing: 300;
text-clip: false;
text-placement: line;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
text-face-name: @book-fonts;

[construction = 'motorway'],
[construction = 'trunk'],
[construction = 'primary'],
[construction = 'secondary'] {
[zoom >= 14] {
text-size: 9;
}
[zoom >= 15] {
text-size: 10;
}
}
[construction = 'tertiary'][zoom >= 14] {
text-size: 9;
}
[construction = 'residential'],
[construction = 'unclassified'],
[construction = 'road'],
[construction = 'living_street'],
[construction = 'pedestrian'],
[construction = 'raceway'],
[construction = 'service'],
[construction = 'track'],
[construction = 'bridleway'],
[construction = 'footway'],
[construction = 'cycleway'],
[construction = 'path'],
[construction = 'steps'],
[construction = null] {
[zoom >= 16] {
text-size: 9;
}
}
[zoom >= 17] {
text-size: 11;
text-spacing: 400;
}
[zoom >= 19] {
text-size: 12;
text-spacing: 400;
}
}
}
Expand Down

0 comments on commit fe745ff

Please sign in to comment.