Skip to content

Commit

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

#area-barriers {
[zoom >= 16] {
line-color: #444;
line-width: 0.4;
[feature = 'barrier_hedge'] {
[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
4 changes: 2 additions & 2 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 Down

0 comments on commit ed54e86

Please sign in to comment.