Skip to content

Commit

Permalink
Render 3px line for hedges without area=yes and only show fill with a…
Browse files Browse the repository at this point in the history
…rea=yes
  • Loading branch information
jeisenbe committed Aug 3, 2019
1 parent 3a1ec10 commit 91c77cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 9 additions & 6 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -825,13 +825,16 @@
}

#area-barriers {
[zoom >= 16] {
line-color: #444;
line-width: 0.4;
[feature = 'barrier_hedge'] {
line-color: #aed1a0;
line-width: 1;
[feature = 'barrier_hedge'][area = 'yes'] {
polygon-fill: #aed1a0;
[zoom >= 17] {
line-width: 2;
}
[zoom >= 18] {
line-width: 1;
}
[zoom >= 19] {
line-width: 0.5;
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@ Layer:
<<: *osm2pgsql
table: |-
(SELECT
way, COALESCE(historic, barrier) AS feature
FROM (SELECT way,
way, area, COALESCE(historic, barrier) AS feature
FROM (SELECT way, tags->'area' AS area,
('barrier_' || (CASE WHEN barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail',
'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall') THEN barrier ELSE NULL END)) AS barrier,
('historic_' || (CASE WHEN historic = 'citywalls' THEN historic ELSE NULL END)) AS historic
Expand All @@ -623,7 +623,6 @@ Layer:
'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall')
OR historic = 'citywalls')
AND building IS NULL
AND tags->'area' = 'yes'
) AS features
) AS area_barriers
properties:
Expand Down

0 comments on commit 91c77cb

Please sign in to comment.