Skip to content

Commit

Permalink
Render leisure=bleachers ways.
Browse files Browse the repository at this point in the history
Discussion held in
#3140
suggested `leisure=bleachers` rendering could be similar in style to
pedestrian areas or other human-access features.

That is precisely what this patch does.

Colors were chosen to be those of `highway=pedestrian` because they are
pretty neutral; as `leisure=bleachers` can be used in a number of
contexts (such as sport pitches and outdoor theaters), I believe this
reduces potential visual confusion.

Note that it only renders ways; though found in the wild,
`leisure=bleachers` nodes are not supposed to be used.
  • Loading branch information
waptaff committed Jun 28, 2024
1 parent 84c844d commit dfb8ab6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Layer:
'brownfield', 'landfill', 'salt_pond', 'construction', 'plant_nursery', 'religious', 'flowerbed') THEN landuse END)) AS landuse,
('shop_' || (CASE WHEN shop IN ('mall') AND (tags->'location' NOT IN ('underground') OR (tags->'location') IS NULL) THEN shop END)) AS shop,
('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'garden',
'golf_course', 'miniature_golf', 'sports_centre', 'stadium', 'pitch', 'ice_rink',
'golf_course', 'miniature_golf', 'sports_centre', 'stadium', 'pitch', 'bleachers', 'ice_rink',
'track', 'dog_park', 'fitness_station', 'water_park') THEN leisure END)) AS leisure,
('man_made_' || (CASE WHEN man_made IN ('works', 'wastewater_plant', 'water_works') THEN man_made END)) AS man_made,
('natural_' || (CASE WHEN "natural" IN ('beach', 'shoal', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" END)) AS "natural",
Expand Down Expand Up @@ -1598,7 +1598,7 @@ Layer:
'shop' || CASE WHEN shop IN ('yes', 'no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END,
'leisure_' || CASE WHEN leisure IN ('amusement_arcade', 'beach_resort', 'bird_hide', 'bowling_alley', 'dog_park', 'firepit', 'fishing',
'fitness_centre', 'fitness_station', 'garden', 'golf_course', 'ice_rink', 'marina', 'miniature_golf',
'outdoor_seating', 'park', 'picnic_table', 'pitch', 'playground',
'outdoor_seating', 'park', 'picnic_table', 'pitch', 'bleachers', 'playground',
'sauna', 'slipway', 'sports_centre', 'stadium', 'swimming_area', 'swimming_pool', 'track', 'water_park') THEN leisure END,
'power_' || CASE WHEN power IN ('plant', 'generator', 'substation') THEN power END,
'man_made_' || CASE WHEN (man_made IN ('chimney', 'communications_tower', 'crane', 'lighthouse', 'mast', 'obelisk', 'silo', 'storage_tank',
Expand Down
9 changes: 9 additions & 0 deletions style/landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,15 @@
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'leisure_bleachers'][zoom >= 10] {
polygon-fill: @pedestrian-fill;
[zoom >= 15] {
line-width: 0.5;
line-opacity: 0.25;
line-color: @pedestrian-casing;
}
}
}
}

Expand Down

0 comments on commit dfb8ab6

Please sign in to comment.