Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rendering of leisure=dog_park #2216

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,13 @@
marker-clip: false;
}

[feature = 'leisure_dog_park'][zoom >= 17] {
marker-file: url('symbols/dog_park.16.svg');
marker-placement: interior;
marker-fill: darken(@park, 60%);
marker-clip: false;
}

[feature = 'leisure_playground'][zoom >= 17] {
marker-file: url('symbols/playground.16.svg');
marker-fill: @amenity-brown;
Expand Down Expand Up @@ -1520,6 +1527,7 @@
[feature = 'leisure_sports_centre'],
[feature = 'leisure_stadium'],
[feature = 'leisure_track'],
[feature = 'leisure_dog_park'],
[feature = 'leisure_pitch'] {
[zoom >= 10][way_pixels > 3000][is_building = 'no'],
[zoom >= 17][is_building = 'no'],
Expand Down Expand Up @@ -1634,6 +1642,11 @@
[feature = 'leisure_stadium'] {
text-fill: darken(@stadium, 70%);
}
[feature = 'leisure_dog_park'] {
text-fill: darken(@park, 60%);
text-halo-radius: 1.5; /* Extra halo needed to stand out from paw pattern. */
text-halo-fill: rgba(255,255,255,0.6);
}
[feature = 'leisure_track'] {
text-fill: darken(@track, 40%);
}
Expand Down
14 changes: 14 additions & 0 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,20 @@
}
}

[feature = 'leisure_dog_park'] {
[zoom >= 10] {
polygon-fill: darken(@park, 5%);
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
[zoom >= 16] {
polygon-pattern-file: url('symbols/dog_park.png');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
}
}

[feature = 'leisure_golf_course'][zoom >= 10],
[feature = 'leisure_miniature_golf'][zoom >= 15] {
polygon-fill: @golf_course;
Expand Down
8 changes: 4 additions & 4 deletions project.mml

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Layer:
'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,
('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden',
'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch',
'track') THEN leisure ELSE NULL END)) AS leisure,
'track', 'dog_park') THEN leisure ELSE NULL END)) AS leisure,
('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,
('natural_' || (CASE WHEN "natural" IN ('beach', 'shoal', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" ELSE NULL END)) AS "natural",
('wetland_' || (CASE WHEN "natural" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN "natural" IN ('marsh', 'mud') THEN "natural" ELSE wetland END) ELSE NULL END)) AS wetland,
Expand Down Expand Up @@ -1755,7 +1755,8 @@ Layer:
'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', 'sewing', 'shoe_repair', 'shopping_centre',
'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'trade', 'tyres',
'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway') THEN leisure ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park') THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN "natural" ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,
Expand Down Expand Up @@ -1793,7 +1794,8 @@ Layer:
'taxi', 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub',
'veterinary', 'social_facility')
OR shop IS NOT NULL -- skip checking a huge list and use a null check
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway')
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park')
OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk')
OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross')
Expand Down Expand Up @@ -2075,7 +2077,7 @@ Layer:
'yes') THEN 'other' ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track',
'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina',
'picnic_table') THEN leisure ELSE NULL END,
'picnic_table', 'dog_park') THEN leisure ELSE NULL END,
'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,
'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery',
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland',
Expand Down Expand Up @@ -2217,7 +2219,7 @@ Layer:
'wholesale', 'yes') THEN 'other' ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track',
'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina',
'slipway', 'picnic_table') THEN leisure ELSE NULL END,
'slipway', 'picnic_table', 'dog_park') THEN leisure ELSE NULL END,
'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,
'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery',
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland',
Expand Down
59 changes: 59 additions & 0 deletions symbols/dog_park.16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/dog_park.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.