Skip to content

Commit

Permalink
Merge pull request gravitystorm#2891 from kocio-pl/fitness
Browse files Browse the repository at this point in the history
Unified rendering of leisure=fitness_station and leisure=fitness_centre
  • Loading branch information
kocio-pl authored Nov 12, 2017
2 parents 784749d + 3601cef commit b55d202
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 16 deletions.
17 changes: 15 additions & 2 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,14 @@
marker-clip: false;
}

[feature = 'leisure_fitness_centre'][zoom >= 17],
[feature = 'leisure_fitness_station'][zoom >= 17] {
marker-file: url('symbols/fitness.svg');
marker-placement: interior;
marker-fill: @leisure-green;
marker-clip: false;
}

[feature = 'leisure_dog_park'][zoom >= 17] {
marker-file: url('symbols/shop/pet.svg');
marker-placement: interior;
Expand Down Expand Up @@ -1423,7 +1431,9 @@
}

[feature = 'leisure_playground'],
[feature = 'leisure_dog_park'] {
[feature = 'leisure_dog_park'],
[feature = 'leisure_fitness_centre'],
[feature = 'leisure_fitness_station'] {
[way_area >= 150000][zoom >= 14],
[way_area >= 80000][zoom >= 15],
[way_area >= 20000][zoom >= 16],
Expand Down Expand Up @@ -1579,6 +1589,7 @@
[feature = 'natural_shoal'],
[feature = 'natural_reef'],
[feature = 'leisure_fitness_centre'],
[feature = 'leisure_fitness_station'],
[feature = 'leisure_sports_centre'],
[feature = 'leisure_stadium'],
[feature = 'leisure_track'],
Expand Down Expand Up @@ -1698,11 +1709,13 @@
[feature = 'natural_shoal'] {
text-fill: darken(@beach, 60%);
}
[feature = 'leisure_fitness_centre'],
[feature = 'leisure_sports_centre'],
[feature = 'leisure_stadium'] {
text-fill: darken(@stadium, 70%);
}
[feature = 'leisure_dog_park'],
[feature = 'leisure_fitness_centre'],
[feature = 'leisure_fitness_station'],
[feature = 'leisure_dog_park'] {
text-fill: @leisure-green;
text-halo-radius: @standard-halo-radius * 1.5; /* Extra halo needed to stand out from paw pattern. */
Expand Down
14 changes: 7 additions & 7 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
@mud: rgba(203,177,154,0.3); // produces #e6dcd1 over @land
@place_of_worship: #cdccc9;
@place_of_worship_outline: #111;
@playground: lighten(@park, 5%);
@leisure: lighten(@park, 5%);
@power: darken(@industrial, 5%);
@power-line: darken(@industrial-line, 5%);
@sand: #f5e9c6;
Expand All @@ -61,7 +61,7 @@

@pitch: #aae0cb; // also track
@track: @pitch;
@stadium: @societal_amenities; // also fitness_centre and sports_centre
@stadium: @societal_amenities; // also sports_centre
@golf_course: #b5e3b5;

#landcover-low-zoom[zoom < 10],
Expand Down Expand Up @@ -97,9 +97,10 @@
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'leisure_playground'][zoom >= 13] {
polygon-fill: @playground;
line-color: darken(@playground, 60%);
[feature = 'leisure_playground'][zoom >= 13],
[feature = 'leisure_fitness_station'][zoom >= 13] {
polygon-fill: @leisure;
line-color: darken(@leisure, 60%);
line-width: 0.3;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
Expand Down Expand Up @@ -260,7 +261,7 @@

[feature = 'leisure_dog_park'] {
[zoom >= 10] {
polygon-fill: @playground;
polygon-fill: @leisure;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
Expand Down Expand Up @@ -581,7 +582,6 @@
polygon-fill: @railway;
}

[feature = 'leisure_fitness_centre'],
[feature = 'leisure_sports_centre'],
[feature = 'leisure_stadium'] {
[zoom >= 10] {
Expand Down
15 changes: 8 additions & 7 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Layer:
'brownfield', 'landfill', 'construction', 'plant_nursery', 'religious') 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', 'fitness_centre', 'sports_centre', 'stadium', 'pitch',
'track', 'dog_park') THEN leisure ELSE NULL END)) AS leisure,
'track', 'dog_park', 'fitness_station') THEN leisure ELSE NULL END)) AS leisure,
('man_made_' || (CASE WHEN man_made IN ('works') THEN man_made ELSE NULL END)) AS man_made,
('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",
Expand Down Expand Up @@ -1419,7 +1419,8 @@ Layer:
'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',
'charging_station', 'arts_centre', 'ferry_terminal', 'marketplace') THEN amenity ELSE NULL END,
'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END,
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') THEN leisure ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table',
'fitness_centre', 'fitness_station') 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 ('spring') THEN "natural" ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site')
Expand Down Expand Up @@ -1454,7 +1455,7 @@ Layer:
'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site')
OR amenity IS NOT NULL -- skip checking a huge list and use a null check
OR shop IS NOT NULL
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table')
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'fitness_centre', 'fitness_station')
OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk')
OR "natural" IN ('spring')
OR historic IN ('memorial', 'monument', 'archaeological_site')
Expand Down Expand Up @@ -1509,7 +1510,7 @@ Layer:
'emergency_' || CASE WHEN tags->'emergency' IN ('phone') THEN tags->'emergency' ELSE NULL END,
'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END,
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park') THEN leisure ELSE NULL END,
'dog_park', 'fitness_centre', 'fitness_station') 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')
Expand Down Expand Up @@ -1556,7 +1557,7 @@ Layer:
OR amenity IS NOT NULL -- skip checking a huge list and use a null check
OR shop IS NOT NULL
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park')
'dog_park', 'fitness_centre', 'fitness_station')
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 @@ -1935,7 +1936,7 @@ Layer:
WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END,
'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'fitness_centre', 'sports_centre', 'stadium', 'track',
'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina',
'picnic_table', 'dog_park') THEN leisure ELSE NULL END,
'picnic_table', 'dog_park', 'fitness_station') 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', 'farmland',
Expand Down Expand Up @@ -2076,7 +2077,7 @@ Layer:
WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END,
'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'fitness_centre', 'sports_centre', 'stadium', 'track',
'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina',
'slipway', 'picnic_table', 'dog_park') THEN leisure ELSE NULL END,
'slipway', 'picnic_table', 'dog_park', 'fitness_station') 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', 'farmland',
Expand Down
30 changes: 30 additions & 0 deletions symbols/fitness.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b55d202

Please sign in to comment.