Skip to content

Commit

Permalink
Fix bicycle route name not rendered if no ref.
Browse files Browse the repository at this point in the history
  • Loading branch information
Florimondable committed Jan 28, 2021
1 parent fe7c2be commit 2d8a23b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Render dam #481.
* Add dashline outline on path like way tunnels #492.
* Fix cycleway hidded by rail background #451.
* Fix cycleroute name not rendered if no ref #510.

## v0.4

Expand Down
56 changes: 29 additions & 27 deletions labels.mss
Original file line number Diff line number Diff line change
Expand Up @@ -606,35 +606,37 @@
shield-fill: @mtb-shield-fill;
shield-file: url("symbols/shields/mtb_[width]x[height].svg");
}
}

//Route name label
[zoom >= 16]
{
text-size: 9;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @road_halo;
text-spacing: 900;
text-clip: false;
text-placement: line;
text-face-name: @sans;
text-vertical-alignment: top;
text-dy: 12;
text-repeat-distance: 900;
text-name: "[name]";
//Route name label
#bicycle_routes_labels[type='icn'][zoom >= 16],
#bicycle_routes_labels[type='ncn'][zoom >= 16],
#bicycle_routes_labels[type='rcn'][zoom >= 16],
#bicycle_routes_labels[type='lcn'][zoom >= 16] {
text-size: 9;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @road_halo;
text-spacing: 900;
text-clip: false;
text-placement: line;
text-face-name: @sans;
text-vertical-alignment: top;
text-dy: 12;
text-repeat-distance: 900;
text-name: "[name]";

text-fill: darken(@icn-overlay, 25%);
[route='bicycle'][type='ncn'] {
text-fill: darken(@ncn-overlay, 25%);
}
[route='bicycle'][type='rcn'] {
text-fill: darken(@rcn-overlay, 25%);
}
[route='bicycle'][type='lcn'] {
text-fill: darken(@lcn-overlay, 25%);
}
[route='mtb'] {
text-fill: darken(@mtb-overlay, 25%);
}
text-fill: darken(@icn-overlay, 25%);
[route='bicycle'][type='ncn'] {
text-fill: darken(@ncn-overlay, 25%);
}
[route='bicycle'][type='rcn'] {
text-fill: darken(@rcn-overlay, 25%);
}
[route='bicycle'][type='lcn'] {
text-fill: darken(@lcn-overlay, 25%);
}
[route='mtb'] {
text-fill: darken(@mtb-overlay, 25%);
}
}

Expand Down
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@ Layer:
SELECT way, route, tags->'network' AS type, ref, name, 1 as height, char_length(ref) AS width
FROM planet_osm_line
WHERE (route = 'bicycle' OR route = 'mtb')
AND ref IS NOT NULL
AND (ref IS NOT NULL OR name IS NOT NULL)
AND (NOT ((tags->'network') IS NOT NULL AND (tags->'network:type') IS NOT NULL AND (tags->'network' = 'rcn') AND tags->'network:type' = 'node_network'))
) AS data
geometry: linestring
Expand Down

0 comments on commit 2d8a23b

Please sign in to comment.