Skip to content

Commit

Permalink
Adding amenity=clock and fixing double text rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
james2432 committed May 25, 2018
1 parent 7fd7cd7 commit d0e029b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
16 changes: 16 additions & 0 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
10 changes: 7 additions & 3 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
32 changes: 32 additions & 0 deletions symbols/clock.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 d0e029b

Please sign in to comment.