From 7020aea2881a9ca202abb49c5708037f4c1b30bf Mon Sep 17 00:00:00 2001 From: Joseph E <42757252+jeisenbe@users.noreply.github.com> Date: Fri, 25 Oct 2019 22:36:10 +0900 Subject: [PATCH] Move parking back to amenity-points layers, change way_pixels limit and fix initial zoom level (#3923) * Move parking back to amenity-points layers Parking had previously been rendered in both amenity-points and amenity-low-priority. Recently PR #3874 had consolidated parking rendering in low-priority only, but this leads to problems when there is a building or an address on the same feature The minzoom for text-low-priority is changed back to z17 * Change parking text intial zoom to z14 In PR #3612 it was planned to render parking from z14 only, however this was not yet changed for the text labels, only for the icon. * Change way_pixels limit for parking icon and text Start showing icon at 750 pixels instead of 900, but don't show text label till 3000 way_pixels, as with most other features --- amenity-points.mss | 38 +++++++++++++++++++------------------- project.mml | 18 +++++++++--------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index 042e667c96..a040ff70a6 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -1434,27 +1434,12 @@ marker-fill: @man-made-icon; } } -} - -#amenity-low-priority { - [feature = 'man_made_cross'][zoom >= 16], - [feature = 'historic_wayside_cross'][zoom >= 16] { - marker-file: url('symbols/man_made/cross.svg'); - marker-fill: @religious-icon; - marker-clip: false; - } - - [feature = 'historic_wayside_shrine'][zoom >= 17] { - marker-file: url('symbols/historic/shrine.svg'); - marker-fill: @man-made-icon; - marker-clip: false; - } [feature = 'amenity_parking'], [feature = 'amenity_bicycle_parking'], [feature = 'amenity_motorcycle_parking'], [feature = 'amenity_parking_entrance'] { - [zoom >= 14][way_pixels > 900], + [zoom >= 14][way_pixels > 750], [zoom >= 17][feature = 'amenity_parking'], [zoom >= 18] { [feature = 'amenity_parking'] { marker-file: url('symbols/amenity/parking.svg'); } @@ -1466,6 +1451,21 @@ [access != ''][access != 'permissive'][access != 'yes'] { marker-opacity: 0.33; } } } +} + +#amenity-low-priority { + [feature = 'man_made_cross'][zoom >= 16], + [feature = 'historic_wayside_cross'][zoom >= 16] { + marker-file: url('symbols/man_made/cross.svg'); + marker-fill: @religious-icon; + marker-clip: false; + } + + [feature = 'historic_wayside_shrine'][zoom >= 17] { + marker-file: url('symbols/historic/shrine.svg'); + marker-fill: @man-made-icon; + marker-clip: false; + } [feature = 'railway_level_crossing'][zoom >= 14]::railway, [feature = 'railway_crossing'][zoom >= 15]::railway{ @@ -2919,14 +2919,12 @@ text-halo-fill: @standard-halo-fill; text-face-name: @standard-font; } -} -#text-low-priority { [feature = 'amenity_parking'], [feature = 'amenity_bicycle_parking'], [feature = 'amenity_motorcycle_parking'], [feature = 'amenity_parking_entrance'] { - [zoom >= 10][way_pixels > 900], + [zoom >= 14][way_pixels > 3000], [zoom >= 18] { text-name: "[name]"; text-size: @standard-font-size; @@ -2945,7 +2943,9 @@ [feature = 'amenity_motorcycle_parking'] { text-dy: 12; } } } +} +#text-low-priority { [feature = 'man_made_cross'][zoom >= 17], [feature = 'historic_wayside_cross'][zoom >= 17], [feature = 'historic_wayside_shrine'][zoom >= 17] { diff --git a/project.mml b/project.mml index aa06662452..746bb88528 100644 --- a/project.mml +++ b/project.mml @@ -1497,6 +1497,13 @@ Layer: 'office' || CASE WHEN tags->'office' IN ('no', 'vacant', 'closed', 'disused', 'empty') OR (tags->'office') IS NULL THEN NULL ELSE '' END, 'barrier_' || CASE WHEN barrier IN ('toll_booth') AND way_area IS NULL THEN barrier ELSE NULL END, 'waterway_' || CASE WHEN waterway IN ('dam', 'weir', 'dock') THEN waterway ELSE NULL END, + 'amenity_' || CASE WHEN amenity IN ('bicycle_parking', 'motorcycle_parking') THEN amenity ELSE NULL END, + 'amenity_' || CASE WHEN amenity IN ('parking') AND (tags->'parking' NOT IN ('underground') OR (tags->'parking') IS NULL) THEN amenity ELSE NULL END, + 'amenity_' || CASE WHEN amenity IN ('parking_entrance') + AND tags->'parking' IN ('underground') + AND (access IS NULL OR access NOT IN ('private', 'no')) + AND way_area IS NULL + THEN amenity ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END, 'place_' || CASE WHEN place IN ('locality') AND way_area IS NULL THEN place ELSE NULL END ) AS feature, @@ -2182,13 +2189,6 @@ Layer: COALESCE( 'highway_' || CASE WHEN highway IN ('mini_roundabout') AND way_area IS NULL THEN highway ELSE NULL END, 'railway_' || CASE WHEN railway IN ('level_crossing', 'crossing') AND way_area IS NULL THEN railway ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('bicycle_parking', 'motorcycle_parking') THEN amenity ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('parking') AND (tags->'parking' NOT IN ('underground') OR (tags->'parking') IS NULL) THEN amenity ELSE NULL END, - 'amenity_' || CASE WHEN amenity IN ('parking_entrance') - AND tags->'parking' IN ('underground') - AND (access IS NULL OR access NOT IN ('private', 'no')) - AND way_area IS NULL - THEN amenity ELSE NULL END, 'amenity_' || CASE WHEN amenity IN ('bench', 'waste_basket', 'waste_disposal') AND way_area IS NULL THEN amenity ELSE NULL END, 'historic_' || CASE WHEN historic IN ('wayside_cross', 'wayside_shrine') AND way_area IS NULL THEN historic ELSE NULL END, 'man_made_' || CASE WHEN man_made IN ('cross') AND way_area IS NULL THEN man_made ELSE NULL END, @@ -2231,7 +2231,7 @@ Layer: ) _ WHERE highway IN ('mini_roundabout') OR railway IN ('level_crossing', 'crossing') - OR amenity IN ('parking', 'parking_entrance', 'bicycle_parking', 'motorcycle_parking', 'bench', 'waste_basket', 'waste_disposal') + OR amenity IN ('bench', 'waste_basket', 'waste_disposal') OR historic IN ('wayside_cross', 'wayside_shrine') OR man_made IN ('cross') OR barrier IN ('bollard', 'gate', 'lift_gate', 'swing_gate', 'block', 'log', 'cattle_grid', 'stile', 'motorcycle_barrier', 'cycle_barrier', 'full-height_turnstile', 'turnstile', 'kissing_gate') @@ -2250,4 +2250,4 @@ Layer: # see https://github.com/gravitystorm/openstreetmap-carto/pull/1349#issuecomment-77805678 table: *amenity_low_priority_sql properties: - minzoom: 10 + minzoom: 17