From d0e029bb091ebea9183ea40230181f461591c6dc Mon Sep 17 00:00:00 2001 From: Jamie Date: Fri, 25 May 2018 08:06:28 -0400 Subject: [PATCH] Adding amenity=clock and fixing double text rendering --- amenity-points.mss | 16 ++++++++++++++++ project.mml | 10 +++++++--- symbols/clock.svg | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 symbols/clock.svg diff --git a/amenity-points.mss b/amenity-points.mss index 31eccb4a8a..a8b955d997 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -90,6 +90,22 @@ marker-clip: false; } + [feature = 'amenity_clock']["tower:type" != 'bell_tower'][feature != 'advertising_column'][zoom >= 18] { + [visibility = 'area'] { + marker-file: url('symbols/clock.svg'); + marker-fill: @man-made-icon; + marker-placement: interior; + marker-clip: false; + } + } + + [feature = 'amenity_clock']["tower:type" != 'bell_tower'][feature != 'advertising_column'][zoom >= 19] { + marker-file: url('symbols/clock.svg'); + marker-fill: @man-made-icon; + marker-placement: interior; + marker-clip: false; + } + [feature = 'highway_bus_stop'] { [zoom >= 16] { marker-file: url('symbols/square.svg'); diff --git a/project.mml b/project.mml index 2b3c51faa1..be09849e90 100644 --- a/project.mml +++ b/project.mml @@ -1601,7 +1601,7 @@ Layer: 'fast_food', 'telephone', 'taxi', 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', 'charging_station', 'arts_centre', 'ferry_terminal', 'marketplace', 'waste_disposal', 'shower', 'bbq', - 'nursing_home', 'childcare', 'driving_school') THEN amenity ELSE NULL END, + 'nursing_home', 'childcare', 'driving_school') OR (amenity in ('clock') and tags->'tower:type' IS NULL) THEN amenity ELSE NULL END, 'advertising_' || CASE WHEN tags->'advertising' in ('column') THEN tags->'advertising' else NULL END, 'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END, 'office' || CASE WHEN tags->'office' IN ('no', 'vacant', 'closed', 'disused', 'empty') OR (tags->'office') IS NULL THEN NULL ELSE '' END, @@ -1638,6 +1638,7 @@ Layer: tags->'tower:type' as "tower:type", tags->'castle_type' as castle_type, tags->'information' as information, + tags->'visibility' as "visibility", CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'bed', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', @@ -1704,7 +1705,7 @@ Layer: 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'wilderness_hut', 'guest_house', 'apartment', 'hostel', 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bbq', 'bicycle_rental', 'bus_station', 'cafe', 'public_bath', + 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bbq', 'bicycle_rental', 'bus_station', 'cafe', 'clock', 'public_bath', 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', @@ -1768,6 +1769,7 @@ Layer: tags->'tower:type' as "tower:type", tags->'castle_type' as castle_type, tags->'information' as information, + tags->'visibility' as "visibility", CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'bed', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', @@ -2325,7 +2327,7 @@ Layer: 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'wilderness_hut', 'guest_house', 'apartment', 'camp_site', 'caravan_site', 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', 'theatre', + 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'clock', 'fast_food', 'biergarten', 'bar', 'library', 'theatre', 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', 'bicycle_parking', 'public_bath', 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', 'grave_yard', 'shelter', 'bank', 'embassy', 'fuel', 'bus_station', 'prison', 'university', 'school', 'college', 'kindergarten', 'hospital', @@ -2400,6 +2402,7 @@ Layer: tags->'recycling_type' as recycling_type, tags->'castle_type' as castle_type, tags->'information' as information, + tags->'visibility' as visibility, ref, NULL AS way_area, CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building @@ -2454,6 +2457,7 @@ Layer: WHERE building IS NOT NULL AND building NOT IN ('no') AND name IS NOT NULL + AND NOT tags->'tower:type' IN('bell_tower') ORDER BY way_area DESC ) AS building_text properties: diff --git a/symbols/clock.svg b/symbols/clock.svg new file mode 100644 index 0000000000..26498cbd6b --- /dev/null +++ b/symbols/clock.svg @@ -0,0 +1,32 @@ + + + + + + image/svg+xml + + + + + + + + +