Skip to content

Commit

Permalink
Render shop=convenience;gas from amenity=fuel.
Browse files Browse the repository at this point in the history
Also add an icon for convenience + compressed air.

Fix cyclosm#62.
  • Loading branch information
Phyks committed Feb 20, 2019
1 parent fb7839e commit 7f0c928
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 17 deletions.
9 changes: 8 additions & 1 deletion amenities.mss
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@
[feature = 'amenity_restaurant'][zoom >= 16],
[feature = 'shop_bakery'][zoom >= 16],
[feature = 'shop_convenience'][zoom >= 16],
[feature = 'shop_convenience;gas'][zoom >= 16],
[feature = 'shop_greengrocer'][zoom >= 16],
[feature = 'shop_pastry'][zoom >= 16],
{
Expand All @@ -570,6 +571,7 @@
}
[feature = 'shop_bakery'],
[feature = 'shop_convenience'],
[feature = 'shop_convenience;gas'],
[feature = 'shop_greengrocer'],
[feature = 'shop_pastry'] {
marker-fill: @shop-icon;
Expand Down Expand Up @@ -604,9 +606,13 @@
[feature = 'shop_bakery'][zoom >= 16] {
marker-file: url('symbols/openstreetmap-carto/shop/bakery.svg');
}
[feature = 'shop_convenience'][zoom >= 16] {
[feature = 'shop_convenience'][zoom >= 16],
[feature = 'shop_convenience;gas'][zoom >= 16] {
marker-file: url('symbols/openstreetmap-carto/shop/convenience.svg');
}
[feature = 'shop_convenience;gas'][compressed_air = 'yes'][zoom >= 16] {
marker-file: url('symbols/shop/convenience_air.svg');
}
[feature = 'shop_greengrocer'][zoom >= 16] {
marker-file: url('symbols/openstreetmap-carto/shop/greengrocer.svg');
}
Expand Down Expand Up @@ -690,6 +696,7 @@
[feature = 'shop_bicycle'][zoom >= 16],
[feature = 'shop_bakery'][zoom >= 18],
[feature = 'shop_convenience'][zoom >= 18],
[feature = 'shop_convenience;gas'][zoom >= 18],
[feature = 'shop_greengrocer'][zoom >= 18],
[feature = 'shop_pastry'][zoom >= 18] {
[way_pixels > 3000][zoom >= 17],
Expand Down
32 changes: 16 additions & 16 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -630,10 +630,10 @@ Layer:
tags->'shelter' AS shelter,
way,
name,
COALESCE(
COALESCE( -- order is important here
'aeroway_' || aeroway,
'tourism_' || tourism,
'amenity_' || amenity,
'amenity_' || CASE WHEN amenity != 'fuel' THEN amenity ELSE NULL END,
'shop_' || shop,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL then tags->'emergency' ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('clinic', 'hospital') THEN tags->'healthcare' ELSE NULL END,
Expand Down Expand Up @@ -683,7 +683,7 @@ Layer:
OR tags->'compressed_air'='yes'
OR (amenity='motorcycle_parking' AND (bicycle IS NULL OR bicycle='yes' OR bicycle='designated'))
OR tags->'healthcare' IN ('clinic', 'hospital')
OR shop IN ('bicycle', 'bakery', 'convenience', 'greengrocer', 'supermarket', 'pastry')
OR shop IN ('bicycle', 'bakery', 'convenience', 'convenience;gas', 'greengrocer', 'supermarket', 'pastry')
OR (shop='sports' AND (tags->'service:bicycle:retail'='yes' OR tags->'service:bicycle:repair'='yes' OR tags->'service:bicycle:rental'='yes' OR tags->'service:bicycle:pump'='yes' OR tags->'service:bicycle:diy'='yes'))
OR leisure='picnic_table'
OR (
Expand All @@ -710,7 +710,7 @@ Layer:
-- Supermarkets
WHEN shop='supermarket' THEN 40
-- Convenience
WHEN shop='convenience' THEN 50
WHEN shop='convenience' OR shop='convenience;gas' THEN 50
-- Food
WHEN shop IS NOT NULL OR amenity IN ('bar', 'biergarten', 'cafe', 'fast_food', 'food_court', 'pub', 'restaurant') THEN 60
-- Everything else
Expand All @@ -736,10 +736,10 @@ Layer:
tags->'shelter' AS shelter,
way,
name,
COALESCE(
COALESCE( -- order is important here
'aeroway_' || aeroway,
'tourism_' || tourism,
'amenity_' || amenity,
'amenity_' || CASE WHEN amenity != 'fuel' THEN amenity ELSE NULL END,
'shop_' || shop,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL then tags->'emergency' ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('clinic', 'hospital') THEN tags->'healthcare' ELSE NULL END,
Expand Down Expand Up @@ -804,7 +804,7 @@ Layer:
OR tags->'compressed_air'='yes'
OR (amenity='motorcycle_parking' AND (bicycle IS NULL OR bicycle='yes' OR bicycle='designated'))
OR tags->'healthcare' IN ('clinic', 'hospital')
OR shop IN ('bicycle', 'bakery', 'convenience', 'greengrocer', 'supermarket', 'pastry')
OR shop IN ('bicycle', 'bakery', 'convenience', 'convenience;gas', 'greengrocer', 'supermarket', 'pastry')
OR (shop='sports' AND (tags->'service:bicycle:retail'='yes' OR tags->'service:bicycle:repair'='yes' OR tags->'service:bicycle:rental'='yes' OR tags->'service:bicycle:pump'='yes' OR tags->'service:bicycle:diy'='yes'))
OR leisure='picnic_table'
OR (
Expand Down Expand Up @@ -832,7 +832,7 @@ Layer:
-- Supermarkets
WHEN shop='supermarket' THEN 40
-- Convenience
WHEN shop='convenience' THEN 50
WHEN shop='convenience' OR shop='convenience;gas' THEN 50
-- Food
WHEN shop IS NOT NULL OR amenity IN ('bar', 'biergarten', 'cafe', 'fast_food', 'food_court', 'pub', 'restaurant') THEN 60
-- Everything else
Expand Down Expand Up @@ -886,10 +886,10 @@ Layer:
tags->'shelter' AS shelter,
way,
name,
COALESCE(
COALESCE( -- order is important here
'aeroway_' || aeroway,
'tourism_' || tourism,
'amenity_' || amenity,
'amenity_' || CASE WHEN amenity != 'fuel' THEN amenity ELSE NULL END,
'shop_' || shop,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL then tags->'emergency' ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('clinic', 'hospital') THEN tags->'healthcare' ELSE NULL END,
Expand Down Expand Up @@ -938,7 +938,7 @@ Layer:
OR amenity IN ('bar', 'bicycle_rental', 'bicycle_parking', 'bicycle_repair_station', 'biergarten', 'cafe', 'compressed_air', 'drinking_water', 'fast_food', 'food_court', 'fountain', 'hospital', 'ice_cream', 'internet_cafe', 'pharmacy', 'police', 'post_office', 'post_box', 'pub', 'public_bath', 'restaurant', 'shelter', 'shower', 'toilets')
OR tags->'compressed_air'='yes'
OR (amenity='motorcycle_parking' AND (bicycle IS NULL OR bicycle='yes' OR bicycle='designated'))
OR shop IN ('bicycle', 'bakery', 'convenience', 'greengrocer', 'supermarket', 'pastry')
OR shop IN ('bicycle', 'bakery', 'convenience', 'convenience;gas', 'greengrocer', 'supermarket', 'pastry')
OR (shop='sports' AND (tags->'service:bicycle:retail'='yes' OR tags->'service:bicycle:repair'='yes' OR tags->'service:bicycle:rental'='yes' OR tags->'service:bicycle:pump'='yes' OR tags->'service:bicycle:diy'='yes'))
OR tags->'healthcare' IN ('clinic', 'hospital')
OR leisure='picnic_table'
Expand Down Expand Up @@ -966,7 +966,7 @@ Layer:
-- Supermarkets
WHEN shop='supermarket' THEN 40
-- Convenience
WHEN shop='convenience' THEN 50
WHEN shop='convenience' OR shop='convenience;gas' THEN 50
-- Food
WHEN shop IS NOT NULL OR amenity IN ('bar', 'biergarten', 'cafe', 'fast_food', 'food_court', 'pub', 'restaurant') THEN 60
-- Everything else
Expand Down Expand Up @@ -1008,10 +1008,10 @@ Layer:
tags->'shelter' AS shelter,
way,
name,
COALESCE(
COALESCE( -- order is important here
'aeroway_' || aeroway,
'tourism_' || tourism,
'amenity_' || amenity,
'amenity_' || CASE WHEN amenity != 'fuel' THEN amenity ELSE NULL END,
'shop_' || shop,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL then tags->'emergency' ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('clinic', 'hospital') THEN tags->'healthcare' ELSE NULL END,
Expand Down Expand Up @@ -1075,7 +1075,7 @@ Layer:
OR amenity IN ('bar', 'bicycle_rental', 'bicycle_parking', 'bicycle_repair_station', 'biergarten', 'cafe', 'compressed_air', 'drinking_water', 'fast_food', 'food_court', 'fountain', 'hospital', 'ice_cream', 'internet_cafe', 'pharmacy', 'police', 'post_office', 'post_box', 'pub', 'public_bath', 'restaurant', 'shelter', 'shower', 'toilets')
OR tags->'compressed_air'='yes'
OR (amenity='motorcycle_parking' AND (bicycle IS NULL OR bicycle='yes' OR bicycle='designated'))
OR shop IN ('bicycle', 'bakery', 'convenience', 'greengrocer', 'supermarket', 'pastry')
OR shop IN ('bicycle', 'bakery', 'convenience', 'convenience;gas', 'greengrocer', 'supermarket', 'pastry')
OR (shop='sports' AND (tags->'service:bicycle:retail'='yes' OR tags->'service:bicycle:repair'='yes' OR tags->'service:bicycle:rental'='yes' OR tags->'service:bicycle:pump'='yes' OR tags->'service:bicycle:diy'='yes'))
OR tags->'healthcare' IN ('clinic', 'hospital')
OR leisure='picnic_table'
Expand Down Expand Up @@ -1104,7 +1104,7 @@ Layer:
-- Supermarkets
WHEN shop='supermarket' THEN 40
-- Convenience
WHEN shop='convenience' THEN 50
WHEN shop='convenience' OR shop='convenience;gas' THEN 50
-- Food
WHEN shop IS NOT NULL OR amenity IN ('bar', 'biergarten', 'cafe', 'fast_food', 'food_court', 'pub', 'restaurant') THEN 60
-- Everything else
Expand Down
119 changes: 119 additions & 0 deletions symbols/shop/convenience_air.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 7f0c928

Please sign in to comment.