From def64cd994a7a5806e63b2c652c59c91172f112c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ko=C4=87?= Date: Tue, 15 Aug 2017 21:20:29 +0200 Subject: [PATCH] Move plaque rendering to higher zoom levels --- amenity-points.mss | 10 +++++++++- project.mml | 20 ++++++++++++++++---- symbols/plaque.svg | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 symbols/plaque.svg diff --git a/amenity-points.mss b/amenity-points.mss index e02247a1c5..6b32f30b7b 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -544,7 +544,14 @@ } [feature = 'historic_memorial'][zoom >= 17] { - marker-file: url('symbols/memorial.svg'); + marker-file: url('symbols/memorial.svg'); + marker-fill: @amenity-brown; + marker-placement: interior; + marker-clip: false; + } + + [feature = 'historic_memorial_plaque'][zoom >= 19] { + marker-file: url('symbols/plaque.svg'); marker-fill: @amenity-brown; marker-placement: interior; marker-clip: false; @@ -1245,6 +1252,7 @@ [feature = 'tourism_artwork'][zoom >= 17], [feature = 'historic_memorial'][zoom >= 17], + [feature = 'historic_memorial_plaque'][zoom >= 19], [feature = 'man_made_obelisk'][zoom >= 16], [feature = 'historic_monument'][zoom >= 16], [feature = 'historic_archaeological_site'][zoom >= 17] { diff --git a/project.mml b/project.mml index ad3305274b..464a1d880b 100644 --- a/project.mml +++ b/project.mml @@ -1571,7 +1571,9 @@ Layer: 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') 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') THEN historic ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') + THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END) + ELSE NULL END, 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway ELSE NULL END, 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END @@ -1611,6 +1613,7 @@ Layer: OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') OR "natural" IN ('spring') OR historic IN ('memorial', 'monument', 'archaeological_site') + OR tags->'memorial' IN ('plaque') OR highway IN ('bus_stop', 'elevator', 'traffic_signals') OR (power = 'generator' AND (tags @> '"generator:source"=>wind' OR tags @> 'power_source=>wind')) ORDER BY way_area desc @@ -1643,7 +1646,9 @@ Layer: 'dog_park') 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') THEN historic ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') + THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END) + ELSE NULL END, 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END, 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END, @@ -1694,6 +1699,7 @@ Layer: 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') + OR tags->'memorial' IN ('plaque') OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') OR (power = 'generator' AND (tags @> '"generator:source"=>wind' OR tags @> 'power_source=>wind')) ORDER BY score DESC NULLS LAST @@ -2033,7 +2039,9 @@ Layer: 'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END, 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END, 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END, - 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') + THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END) + ELSE NULL END, 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END, 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, 'waterway_' || CASE WHEN waterway IN ('dam') THEN waterway ELSE NULL END, @@ -2061,6 +2069,7 @@ Layer: OR place IN ('island', 'islet') OR military IN ('danger_area') OR historic IN ('memorial', 'monument', 'archaeological_site') + OR tags->'memorial' IN ('plaque') OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation') OR boundary IN ('national_park') @@ -2163,7 +2172,9 @@ Layer: THEN "natural" ELSE NULL END, 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END, 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END, - 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, + 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') + THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END) + ELSE NULL END, 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END, 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, 'waterway_' || CASE WHEN waterway IN ('dam', 'weir') THEN waterway ELSE NULL END, @@ -2204,6 +2215,7 @@ Layer: OR place IN ('island', 'islet') OR military IN ('danger_area') OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross') + OR tags->'memorial' IN ('plaque') OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator', 'ford') OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation') OR boundary IN ('national_park') diff --git a/symbols/plaque.svg b/symbols/plaque.svg new file mode 100644 index 0000000000..cf0e4660a2 --- /dev/null +++ b/symbols/plaque.svg @@ -0,0 +1,40 @@ + + + + + + + + image/svg+xml + + + + + + + + +