Skip to content

Commit

Permalink
Add oneway arrows for tracks and paths
Browse files Browse the repository at this point in the history
Fixed rendering of arrows on footways: these will always use the footway color, rather than changing if there is designated=bicycle or designated=bridleway
Fix bridleway arrow color: based on brideway color instead of track color now.
  • Loading branch information
jeisenbe committed Dec 31, 2018
1 parent a242990 commit 0eda58f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 12 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,7 @@ Layer:
properties:
minzoom: 13
- id: paths-text-name
class: directions
geometry: linestring
<<: *extents
Datasource:
Expand All @@ -1987,10 +1988,19 @@ Layer:
(SELECT
way,
highway,
name
name,
CASE
WHEN oneway IN ('yes', '-1') THEN oneway
WHEN junction IN ('roundabout') AND (oneway IS NULL OR NOT oneway IN ('no', 'reversible')) THEN 'yes'
ELSE NULL
END AS oneway,
horse,
bicycle
FROM planet_osm_line
WHERE highway IN ('bridleway', 'footway', 'cycleway', 'path', 'track', 'steps')
AND name IS NOT NULL
AND (name IS NOT NULL
OR oneway IN ('yes', '-1')
OR junction IN ('roundabout'))
) AS paths_text_name
properties:
minzoom: 15
Expand Down
6 changes: 4 additions & 2 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
@steps-oneway-arrow-color: darken(@steps-fill, 35%);
@cycleway-oneway-arrow-color: darken(@cycleway-fill, 25%);
@track-oneway-arrow-color: darken(@track-fill, 15%);
@bridleway-oneway-arrow-color: darken(@track-fill, 10%);
@bridleway-oneway-arrow-color: darken(@bridleway-fill, 15%);

// Shield’s line wrap is based on OpenStreetMap data and not on line-wrap-width,
// but lines are typically rather short, so we use narrow line spacing.
Expand Down Expand Up @@ -3266,7 +3266,9 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[highway = 'raceway'] {
marker-fill: @raceway-oneway-arrow-color;
}
[highway = 'footway'],
[highway = 'footway'] {
marker-fill: @footway-oneway-arrow-color;
}
[highway = 'path'] {
marker-fill: @footway-oneway-arrow-color;
[horse = 'designated'] {
Expand Down

0 comments on commit 0eda58f

Please sign in to comment.