Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use parameters of road type for text rendering of roads under construction #2593

Merged
merged 1 commit into from
Apr 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
60 changes: 36 additions & 24 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -2761,7 +2761,10 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
#roads-text-name {
[highway = 'motorway'],
[highway = 'trunk'],
[highway = 'primary'] {
[highway = 'primary'],
[highway = 'construction'][construction = 'motorway'],
[highway = 'construction'][construction = 'trunk'],
[highway = 'construction'][construction = 'primary'] {
[zoom >= 13] {
text-name: "[name]";
text-size: 8;
Expand Down Expand Up @@ -2790,7 +2793,8 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
text-size: 12;
}
}
[highway = 'secondary'] {
[highway = 'secondary'],
[highway = 'construction'][construction = 'secondary'] {
[zoom >= 13] {
text-name: "[name]";
text-size: 8;
Expand All @@ -2815,7 +2819,8 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
text-size: 12;
}
}
[highway = 'tertiary'] {
[highway = 'tertiary'],
[highway = 'construction'][construction = 'tertiary'] {
[zoom >= 14] {
text-name: "[name]";
text-size: 9;
Expand All @@ -2834,29 +2839,32 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
text-size: 12;
}
}
[highway = 'construction'] {
[int_construction_minor = 'no'][zoom >= 13],
[int_construction_minor = 'yes'][zoom >= 14] {
text-name: "[name]";
text-size: 9;
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;
[zoom >= 17] {
text-size: 11;
}
[zoom >= 19] {
text-size: 12;
}
[highway = 'construction'][construction = null][zoom >= 16] {
text-name: "[name]";
text-size: 9;
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;

[zoom >= 17] {
text-size: 11;
text-spacing: 400;
}
[zoom >= 19] {
text-size: 12;
text-spacing: 400;
}
}
[highway = 'residential'],
[highway = 'unclassified'],
[highway = 'road'] {
[highway = 'road'],
[highway = 'construction'][construction = 'residential'],
[highway = 'construction'][construction = 'unclassified'],
[highway = 'construction'][construction = 'road'] {
[zoom >= 15] {
text-name: "[name]";
text-size: 8;
Expand All @@ -2882,7 +2890,9 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
}

[highway = 'raceway'],
[highway = 'service'] {
[highway = 'service'],
[highway = 'construction'][construction = 'raceway'],
[highway = 'construction'][construction = 'service'] {
[zoom >= 16] {
text-name: "[name]";
text-size: 9;
Expand All @@ -2901,7 +2911,9 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
}

[highway = 'living_street'],
[highway = 'pedestrian'] {
[highway = 'pedestrian'],
[highway = 'construction'][construction = 'living_street'],
[highway = 'construction'][construction = 'pedestrian'] {
[zoom >= 15] {
text-name: "[name]";
text-size: 8;
Expand Down