From d55fe9f5dfe1cb239424bedce21b17fcc5e40634 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 2 Oct 2018 17:43:49 -0400 Subject: [PATCH] Add generic "Recycling" preset and field `recycling_type=container/center` (closes #5363) --- data/presets.yaml | 19 ++++++++++--- data/presets/fields.json | 1 + data/presets/fields/recycling_type.json | 12 +++++++++ data/presets/presets.json | 3 ++- data/presets/presets/amenity/_recycling.json | 27 +++++++++++++++++++ ...ecycling.json => recycling_container.json} | 7 ----- data/taginfo.json | 15 ++++++++--- dist/locales/en.json | 14 +++++++++- 8 files changed, 82 insertions(+), 16 deletions(-) create mode 100644 data/presets/fields/recycling_type.json create mode 100644 data/presets/presets/amenity/_recycling.json rename data/presets/presets/amenity/{recycling.json => recycling_container.json} (77%) diff --git a/data/presets.yaml b/data/presets.yaml index baa149787..c975f7959 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1267,6 +1267,16 @@ en: recycling_accepts: # 'recycling:=*' label: Accepts + recycling_type: + # recycling_type=* + label: Type + options: + # recycling_type=centre + centre: Center + # recycling_type=container + container: Container + # recycling_type field placeholder + placeholder: 'Container, Center' ref: # ref=* label: Reference Code @@ -2451,14 +2461,17 @@ en: terms: '' amenity/recycling: # amenity=recycling - name: Recycling Container - # 'terms: bin,can,bottle,glass,garbage,rubbish,scrap,trash' - terms: '' + name: Recycling amenity/recycling_centre: # 'amenity=recycling, recycling_type=centre' name: Recycling Center # 'terms: bottle,can,dump,glass,garbage,rubbish,scrap,trash' terms: '' + amenity/recycling_container: + # 'amenity=recycling, recycling_type=container' + name: Recycling Container + # 'terms: bin,can,bottle,glass,garbage,rubbish,scrap,trash' + terms: '' amenity/register_office: # amenity=register_office name: Register Office diff --git a/data/presets/fields.json b/data/presets/fields.json index 8c2246978..b0ec1b069 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -220,6 +220,7 @@ "railway/signal/direction": {"key": "railway:signal:direction", "type": "combo", "label": "Direction", "strings": {"options": {"forward": "Forward", "backward": "Backward", "both": "Both / All"}}}, "rating": {"key": "rating", "type": "combo", "label": "Power Rating", "snake_case": false}, "recycling_accepts": {"key": "recycling:", "type": "multiCombo", "label": "Accepts"}, + "recycling_type": {"key": "recycling_type", "type": "combo", "label": "Type", "placeholder": "Container, Center", "strings": {"options": {"container": "Container", "centre": "Center"}}}, "ref_aeroway_gate": {"key": "ref", "type": "text", "label": "Gate Number"}, "ref_golf_hole": {"key": "ref", "type": "text", "label": "Hole Number", "placeholder": "1-18"}, "ref_highway_junction": {"key": "ref", "type": "text", "label": "Junction Number"}, diff --git a/data/presets/fields/recycling_type.json b/data/presets/fields/recycling_type.json new file mode 100644 index 000000000..31e767816 --- /dev/null +++ b/data/presets/fields/recycling_type.json @@ -0,0 +1,12 @@ +{ + "key": "recycling_type", + "type": "combo", + "label": "Type", + "placeholder": "Container, Center", + "strings": { + "options": { + "container": "Container", + "centre": "Center" + } + } +} diff --git a/data/presets/presets.json b/data/presets/presets.json index c3196ce4e..4d1f7eb42 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -39,6 +39,7 @@ "amenity/coworking_space": {"icon": "maki-commercial", "fields": ["name", "address", "building_area", "opening_hours", "internet_access", "internet_access/fee", "internet_access/ssid"], "geometry": ["point", "area"], "tags": {"amenity": "coworking_space"}, "name": "Coworking Space", "searchable": false}, "amenity/ferry_terminal": {"icon": "maki-ferry", "fields": ["name", "network", "operator", "address", "building_area"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "ferry_terminal"}, "name": "Ferry Station / Terminal", "searchable": false}, "amenity/nursing_home": {"icon": "maki-wheelchair", "fields": ["name", "operator", "address", "building_area", "social_facility", "social_facility_for", "opening_hours", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "nursing_home"}, "reference": {"key": "social_facility", "value": "nursing_home"}, "name": "Nursing Home", "searchable": false}, + "amenity/recycling": {"icon": "maki-recycling", "fields": ["recycling_type", "recycling_accepts", "collection_times"], "geometry": ["point", "area"], "terms": ["bin", "can", "bottle", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling"}, "name": "Recycling", "searchable": false}, "amenity/register_office": {"icon": "maki-town-hall", "fields": ["name", "address", "building_area", "opening_hours", "operator"], "geometry": ["point", "area"], "tags": {"amenity": "register_office"}, "reference": {"key": "government", "value": "register_office"}, "name": "Register Office", "searchable": false}, "amenity/scrapyard": {"icon": "maki-car", "fields": ["name", "operator", "address", "opening_hours"], "geometry": ["point", "area"], "tags": {"amenity": "scrapyard"}, "reference": {"key": "industrial", "value": "scrap_yard"}, "name": "Scrap Yard", "searchable": false}, "amenity/swimming_pool": {"icon": "maki-swimming", "geometry": ["point", "vertex", "area"], "tags": {"amenity": "swimming_pool"}, "reference": {"key": "leisure", "value": "swimming_pool"}, "name": "Swimming Pool", "searchable": false}, @@ -125,7 +126,7 @@ "amenity/public_bookcase": {"icon": "maki-library", "fields": ["name", "operator", "capacity", "website"], "geometry": ["point", "area"], "terms": ["library", "bookcrossing"], "tags": {"amenity": "public_bookcase"}, "name": "Public Bookcase"}, "amenity/ranger_station": {"icon": "maki-ranger-station", "fields": ["name", "operator", "address", "building_area", "opening_hours"], "geometry": ["point", "area"], "terms": ["visitor center", "visitor centre", "permit center", "permit centre", "backcountry office", "warden office", "warden center"], "tags": {"amenity": "ranger_station"}, "name": "Ranger Station"}, "amenity/recycling_centre": {"icon": "maki-recycling", "fields": ["name", "operator", "address", "building", "opening_hours", "recycling_accepts"], "geometry": ["point", "area"], "terms": ["bottle", "can", "dump", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling", "recycling_type": "centre"}, "reference": {"key": "recycling_type", "value": "*"}, "name": "Recycling Center"}, - "amenity/recycling": {"icon": "maki-recycling", "fields": ["recycling_accepts", "collection_times"], "geometry": ["point", "area"], "terms": ["bin", "can", "bottle", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling"}, "addTags": {"amenity": "recycling", "recycling_type": "container"}, "removeTags": {"amenity": "recycling", "recycling_type": "container"}, "reference": {"key": "amenity", "value": "recycling"}, "name": "Recycling Container"}, + "amenity/recycling_container": {"icon": "maki-recycling", "fields": ["recycling_accepts", "collection_times"], "geometry": ["point", "area"], "terms": ["bin", "can", "bottle", "glass", "garbage", "rubbish", "scrap", "trash"], "tags": {"amenity": "recycling", "recycling_type": "container"}, "reference": {"key": "amenity", "value": "recycling"}, "name": "Recycling Container"}, "amenity/restaurant": {"icon": "maki-restaurant", "fields": ["name", "cuisine", "address", "building_area", "opening_hours", "capacity", "takeaway", "delivery", "smoking", "outdoor_seating"], "geometry": ["point", "area"], "terms": ["bar", "breakfast", "cafe", "café", "canteen", "coffee", "dine", "dining", "dinner", "drive-in", "eat", "grill", "lunch", "table"], "tags": {"amenity": "restaurant"}, "name": "Restaurant"}, "amenity/sanitary_dump_station": {"icon": "temaki-storage_tank", "fields": ["operator", "access_simple", "fee", "water_point"], "geometry": ["point", "vertex", "area"], "terms": ["Motor Home", "Camper", "Sanitary", "Dump Station", "Elsan", "CDP", "CTDP", "Chemical Toilet"], "tags": {"amenity": "sanitary_dump_station"}, "name": "RV Toilet Disposal"}, "amenity/school": {"icon": "maki-school", "fields": ["name", "operator", "address", "religion", "denomination"], "geometry": ["point", "area"], "terms": ["academy", "elementary school", "middle school", "high school"], "tags": {"amenity": "school"}, "name": "School Grounds"}, diff --git a/data/presets/presets/amenity/_recycling.json b/data/presets/presets/amenity/_recycling.json new file mode 100644 index 000000000..9fd440d1b --- /dev/null +++ b/data/presets/presets/amenity/_recycling.json @@ -0,0 +1,27 @@ +{ + "icon": "maki-recycling", + "fields": [ + "recycling_type", + "recycling_accepts", + "collection_times" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "bin", + "can", + "bottle", + "glass", + "garbage", + "rubbish", + "scrap", + "trash" + ], + "tags": { + "amenity": "recycling" + }, + "name": "Recycling", + "searchable": false +} diff --git a/data/presets/presets/amenity/recycling.json b/data/presets/presets/amenity/recycling_container.json similarity index 77% rename from data/presets/presets/amenity/recycling.json rename to data/presets/presets/amenity/recycling_container.json index 68847b930..f7ab742ca 100644 --- a/data/presets/presets/amenity/recycling.json +++ b/data/presets/presets/amenity/recycling_container.json @@ -19,13 +19,6 @@ "trash" ], "tags": { - "amenity": "recycling" - }, - "addTags": { - "amenity": "recycling", - "recycling_type": "container" - }, - "removeTags": { "amenity": "recycling", "recycling_type": "container" }, diff --git a/data/taginfo.json b/data/taginfo.json index 2b116be2f..244690dee 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -248,6 +248,13 @@ "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/wheelchair-15.svg?sanitize=true" }, + { + "key": "amenity", + "value": "recycling", + "description": "Recycling", + "object_types": ["node", "area"], + "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/recycling-15.svg?sanitize=true" + }, { "key": "amenity", "value": "register_office", @@ -843,14 +850,14 @@ { "key": "recycling_type", "value": "centre", - "description": "Recycling Center", + "description": "Recycling Center, Type", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/recycling-15.svg?sanitize=true" }, { - "key": "amenity", - "value": "recycling", - "description": "Recycling Container", + "key": "recycling_type", + "value": "container", + "description": "Recycling Container, Type", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/recycling-15.svg?sanitize=true" }, diff --git a/dist/locales/en.json b/dist/locales/en.json index 7f15d4e44..cac517781 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2521,6 +2521,14 @@ "recycling_accepts": { "label": "Accepts" }, + "recycling_type": { + "label": "Type", + "placeholder": "Container, Center", + "options": { + "container": "Container", + "centre": "Center" + } + }, "ref_aeroway_gate": { "label": "Gate Number" }, @@ -3226,6 +3234,10 @@ "name": "Nursing Home", "terms": "" }, + "amenity/recycling": { + "name": "Recycling", + "terms": "bin,can,bottle,glass,garbage,rubbish,scrap,trash" + }, "amenity/register_office": { "name": "Register Office", "terms": "" @@ -3570,7 +3582,7 @@ "name": "Recycling Center", "terms": "bottle,can,dump,glass,garbage,rubbish,scrap,trash" }, - "amenity/recycling": { + "amenity/recycling_container": { "name": "Recycling Container", "terms": "bin,can,bottle,glass,garbage,rubbish,scrap,trash" },