From 3601cef1e16b70fedc6b54acfdef2c072a5d0ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ko=C4=87?= Date: Sun, 15 Oct 2017 17:28:39 +0200 Subject: [PATCH] Unified rendering of leisure=fitness_station and leisure=fitness_centre --- amenity-points.mss | 17 +++++++++++++++-- landcover.mss | 14 +++++++------- project.mml | 15 ++++++++------- symbols/fitness.svg | 30 ++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 symbols/fitness.svg diff --git a/amenity-points.mss b/amenity-points.mss index ccd353531c..d58ce6f57d 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -862,6 +862,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; @@ -1365,7 +1373,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], @@ -1521,6 +1531,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'], @@ -1640,11 +1651,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. */ diff --git a/landcover.mss b/landcover.mss index 8c6caf1d43..2d7105a8ac 100644 --- a/landcover.mss +++ b/landcover.mss @@ -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; @@ -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], @@ -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; } @@ -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; } } @@ -578,7 +579,6 @@ polygon-fill: @railway; } - [feature = 'leisure_fitness_centre'], [feature = 'leisure_sports_centre'], [feature = 'leisure_stadium'] { [zoom >= 10] { diff --git a/project.mml b/project.mml index 89f31631d3..d0cf6fa2aa 100644 --- a/project.mml +++ b/project.mml @@ -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", @@ -1411,7 +1411,8 @@ Layer: 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', 'charging_station', 'arts_centre', 'ferry_terminal') 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') @@ -1445,7 +1446,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') @@ -1499,7 +1500,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') @@ -1545,7 +1546,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') @@ -1923,7 +1924,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', @@ -2056,7 +2057,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', diff --git a/symbols/fitness.svg b/symbols/fitness.svg new file mode 100644 index 0000000000..f4164e3acf --- /dev/null +++ b/symbols/fitness.svg @@ -0,0 +1,30 @@ + +image/svg+xml + \ No newline at end of file