diff --git a/project.mml b/project.mml index ab3966e0ae..738dfcbf8f 100644 --- a/project.mml +++ b/project.mml @@ -1457,23 +1457,28 @@ Layer: FROM (SELECT -- This subselect allows filtering on the feature column way, - CONCAT( - name, - E'\n' || CONCAT( -- by doing this with a || if both the ele and height branches are null, this entire expression is null and only name is used - CASE - WHEN (tags ? 'ele') AND tags->'ele' ~ '^-?\d{1,4}(\.\d+)?$' - AND ("natural" IN ('peak', 'volcano', 'saddle') - OR tourism = 'alpine_hut' OR (tourism = 'information' AND tags->'information' = 'guidepost') - OR amenity = 'shelter' - OR tags->'mountain_pass' = 'yes') - THEN CONCAT(REPLACE(ROUND((tags->'ele')::NUMERIC)::TEXT, '-', U&'\2212'), U&'\00A0', 'm') END, - CASE - WHEN (tags ? 'height') AND tags->'height' ~ '^\d{1,3}(\.\d+)?$' - AND waterway = 'waterfall' - THEN CONCAT(ROUND((tags->'height')::NUMERIC)::TEXT, U&'\00A0', 'm') END + CASE + WHEN amenity = 'parcel_locker' + THEN CONCAT_WS(E'\n', COALESCE(tags->'brand', tags->'operator', name), ref) + ELSE + CONCAT( + name, + E'\n' || CONCAT( -- by doing this with a || if both the ele and height branches are null, this entire expression is null and only name is used + CASE + WHEN (tags ? 'ele') AND tags->'ele' ~ '^-?\d{1,4}(\.\d+)?$' + AND ("natural" IN ('peak', 'volcano', 'saddle') + OR tourism = 'alpine_hut' OR (tourism = 'information' AND tags->'information' = 'guidepost') + OR amenity = 'shelter' + OR tags->'mountain_pass' = 'yes') + THEN CONCAT(REPLACE(ROUND((tags->'ele')::NUMERIC)::TEXT, '-', U&'\2212'), U&'\00A0', 'm') END, + CASE + WHEN (tags ? 'height') AND tags->'height' ~ '^\d{1,3}(\.\d+)?$' + AND waterway = 'waterfall' + THEN CONCAT(ROUND((tags->'height')::NUMERIC)::TEXT, U&'\00A0', 'm') END + ) ) - ) AS name, - tags->'parking' as "parking", + END AS name, + tags->'parking' as "parking", COALESCE( 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway END, 'tourism_' || CASE WHEN tourism IN ('alpine_hut', 'apartment', 'artwork', 'camp_site', 'caravan_site', 'chalet', 'gallery', 'guest_house', @@ -1491,6 +1496,7 @@ Layer: 'university', 'vehicle_inspection', 'veterinary') THEN amenity END, 'amenity_' || CASE WHEN amenity IN ('waste_disposal') AND way_area IS NOT NULL THEN amenity END, -- Waste disposal points are rendered in the low priority layer 'amenity_' || CASE WHEN amenity IN ('vending_machine') AND tags->'vending' IN ('excrement_bags', 'parking_tickets', 'public_transport_tickets') THEN amenity END, + 'amenity_' || CASE WHEN amenity IN ('parcel_locker') THEN amenity END, 'diplomatic_'|| CASE WHEN tags->'office' IN ('diplomatic') AND tags->'diplomatic' IN ('embassy', 'consulate') THEN tags->'diplomatic' ELSE NULL END, 'advertising_' || CASE WHEN tags->'advertising' in ('column') THEN tags->'advertising' END, 'emergency_' || CASE WHEN tags->'emergency' IN ('phone') AND way_area IS NULL THEN tags->'emergency' END, diff --git a/style/amenity-points.mss b/style/amenity-points.mss index 193d39bd44..7861af49dd 100644 --- a/style/amenity-points.mss +++ b/style/amenity-points.mss @@ -192,6 +192,18 @@ marker-clip: false; } + [feature = 'amenity_parcel_locker'][zoom >= 17] { + marker-fill: @amenity-brown; + [zoom >= 17][zoom < 18] { + marker-width: 4; + marker-line-width: 0; + } + [zoom >= 18] { + marker-file: url('symbols/amenity/parcel_locker.svg'); + marker-clip: false; + } + } + [feature = 'highway_traffic_signals'][zoom >= 17] { marker-file: url('symbols/highway/traffic_light.svg'); marker-fill: #545454; @@ -2955,6 +2967,18 @@ [feature = 'amenity_motorcycle_parking'] { text-dy: 12; } } } + + [feature = 'amenity_parcel_locker'][zoom >= 18] { + text-name: "[name]"; + text-dy: 10; + text-size: @standard-font-size; + text-wrap-width: @standard-wrap-width; + text-line-spacing: @standard-line-spacing-size; + text-fill: @amenity-brown; + text-face-name: @standard-font; + text-halo-radius: @standard-halo-radius; + text-halo-fill: @standard-halo-fill; + } } #text-low-priority { diff --git a/symbols/amenity/parcel_locker.svg b/symbols/amenity/parcel_locker.svg new file mode 100644 index 0000000000..c06f71c27f --- /dev/null +++ b/symbols/amenity/parcel_locker.svg @@ -0,0 +1,8 @@ + + + + + + + +