Skip to content

Commit

Permalink
Move parking back to amenity-points layers, change way_pixels limit a…
Browse files Browse the repository at this point in the history
…nd fix initial zoom level (gravitystorm#3923)

* Move parking back to amenity-points layers

Parking had previously been rendered in both amenity-points and amenity-low-priority.
Recently PR gravitystorm#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 gravitystorm#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
  • Loading branch information
jeisenbe authored Oct 25, 2019
1 parent b6faefe commit 7020aea
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
38 changes: 19 additions & 19 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -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'); }
Expand All @@ -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{
Expand Down Expand Up @@ -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;
Expand All @@ -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] {
Expand Down
18 changes: 9 additions & 9 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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')
Expand All @@ -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

0 comments on commit 7020aea

Please sign in to comment.