Merge branch 'develop' into photo-filter-temp

This commit is contained in:
Quincy Morgan
2020-10-16 11:10:46 -04:00
20 changed files with 74 additions and 13 deletions
+3
View File
@@ -1078,6 +1078,9 @@ en:
healthcare/speciality:
# 'healthcare:speciality=*'
label: Specialties
heating:
# heating=*
label: Heating
height:
# height=*
label: Height (Meters)
+9
View File
@@ -294,6 +294,15 @@ A string specifying the UI and behavior of the field. Must be one of the followi
* `wikidata` - Search field for selecting a Wikidata entity
* `wikipedia` - Block of fields for selecting a wiki language and Wikipedia page
##### `usage`
A string specifying how iD uses the field. Must be one of the following values.
* `preset` - The field is listed in one or more preset files (default and most common value)
* `changeset` - The field is only used for changeset tags when uploading, e.g. `comment`
* `group` - The field is only used within another field such as `structure`, e.g. `cutting`
* `manual` - The field is only added by iD programmatically as needed, e.g. `restrictions`
##### `key`/`keys`
The `key` property names the OSM key that the field will edit.
+9 -8
View File
@@ -53,7 +53,7 @@
"brand": {"key": "brand", "type": "text", "label": "Brand"},
"brewery": {"key": "brewery", "type": "semiCombo", "label": "Draft Beers", "terms": ["on tap"]},
"bridge_combo": {"key": "bridge", "type": "combo", "label": "Type"},
"bridge": {"key": "bridge", "type": "typeCombo", "label": "Type", "placeholder": "Default"},
"bridge": {"key": "bridge", "type": "typeCombo", "label": "Type", "usage": "group", "placeholder": "Default"},
"bridge/support": {"key": "bridge:support", "type": "typeCombo", "label": "Type"},
"building_area": {"key": "building", "type": "combo", "default": "yes", "geometry": ["area"], "label": "Building"},
"building": {"key": "building", "type": "combo", "label": "Building", "terms": ["structure"]},
@@ -82,7 +82,7 @@
"collection_times": {"key": "collection_times", "type": "text", "label": "Collection Times"},
"collector": {"key": "collector", "type": "semiCombo", "label": "Items"},
"colour": {"key": "colour", "type": "text", "label": "Color"},
"comment": {"key": "comment", "type": "textarea", "label": "Changeset Comment", "placeholder": "Brief description of your contributions (required)"},
"comment": {"key": "comment", "type": "textarea", "label": "Changeset Comment", "usage": "changeset", "placeholder": "Brief description of your contributions (required)"},
"communication_multi": {"key": "communication:", "type": "multiCombo", "label": "Communication Types"},
"connectivity": {"key": "connectivity", "type": "text", "label": "Connectivity"},
"construction": {"key": "construction", "type": "combo", "label": "Type"},
@@ -103,7 +103,7 @@
"crossing/island": {"key": "crossing:island", "type": "check", "label": "Refuge Island"},
"cuisine": {"key": "cuisine", "type": "semiCombo", "label": "Cuisines", "terms": ["fare", "food types"]},
"currency_multi": {"key": "currency:", "type": "multiCombo", "label": "Currency Types", "terms": ["bills", "cash", "coins", "money"]},
"cutting": {"key": "cutting", "type": "typeCombo", "label": "Type", "placeholder": "Default"},
"cutting": {"key": "cutting", "type": "typeCombo", "label": "Type", "usage": "group", "placeholder": "Default"},
"cycle_network": {"key": "cycle_network", "type": "networkCombo", "label": "Network"},
"cycleway": {"keys": ["cycleway", "cycleway:left", "cycleway:right"], "reference": {"key": "cycleway"}, "type": "cycleway", "label": "Bike Lanes", "placeholder": "none", "strings": {"types": {"cycleway:left": "Left side", "cycleway:right": "Right side"}, "options": {"none": {"title": "None", "description": "No bike lane"}, "lane": {"title": "Standard bike lane", "description": "A bike lane separated from auto traffic by a painted line"}, "shared_lane": {"title": "Shared bike lane", "description": "A bike lane with no separation from auto traffic"}, "track": {"title": "Bike track", "description": "A bike lane separated from traffic by a physical barrier"}, "share_busway": {"title": "Bike lane shared with bus", "description": "A bike lane shared with a bus lane"}, "opposite_lane": {"title": "Opposite bike lane", "description": "A bike lane that travels in the opposite direction of traffic"}, "opposite": {"title": "Contraflow bike lane", "description": "A bike lane that travels in both directions on a one-way street"}}}},
"dance/style": {"key": "dance:style", "type": "semiCombo", "label": "Dance Styles"},
@@ -153,7 +153,7 @@
"ele": {"key": "ele", "type": "number", "icon": "elevation", "label": "Elevation", "geometry": ["line", "area", "relation"], "terms": ["altitude", "height"]},
"electrified": {"key": "electrified", "type": "combo", "label": "Electrification", "placeholder": "Contact Line, Electrified Rail...", "strings": {"options": {"contact_line": "Contact Line", "rail": "Electrified Rail", "yes": "Yes (unspecified)", "no": "No"}}, "terms": ["contact line", "powered", "third rail"]},
"email": {"key": "email", "type": "email", "placeholder": "example@example.com", "label": "Email"},
"embankment": {"key": "embankment", "type": "typeCombo", "label": "Type", "placeholder": "Default"},
"embankment": {"key": "embankment", "type": "typeCombo", "label": "Type", "usage": "group", "placeholder": "Default"},
"embassy": {"key": "embassy", "type": "combo", "label": "Type"},
"emergency_combo": {"key": "emergency", "type": "combo", "label": "Type"},
"emergency_ward_entrance": {"key": "emergency_ward_entrance", "type": "combo", "label": "Type"},
@@ -177,7 +177,7 @@
"flag/type": {"key": "flag:type", "type": "combo", "label": "Flag Type"},
"floating": {"key": "floating", "type": "check", "label": "Floating"},
"flood_prone": {"key": "flood_prone", "type": "check", "label": "Flood Prone"},
"ford": {"key": "ford", "type": "typeCombo", "label": "Type", "placeholder": "Default"},
"ford": {"key": "ford", "type": "typeCombo", "label": "Type", "usage": "group", "placeholder": "Default"},
"fountain": {"key": "fountain", "type": "combo", "label": "Type"},
"frequency_electrified": {"key": "frequency", "type": "combo", "label": "Operating Frequency", "prerequisiteTag": {"key": "electrified", "valueNot": "no"}},
"frequency": {"key": "frequency", "type": "combo", "label": "Operating Frequency"},
@@ -201,9 +201,10 @@
"guest_house": {"key": "guest_house", "type": "combo", "label": "Type"},
"handicap": {"key": "handicap", "type": "number", "label": "Handicap", "placeholder": "1-18"},
"handrail": {"key": "handrail", "type": "check", "label": "Handrail"},
"hashtags": {"key": "hashtags", "type": "semiCombo", "label": "Hashtags", "placeholder": "#example"},
"hashtags": {"key": "hashtags", "type": "semiCombo", "label": "Hashtags", "usage": "changeset", "placeholder": "#example"},
"healthcare": {"key": "healthcare", "type": "typeCombo", "label": "Type"},
"healthcare/speciality": {"key": "healthcare:speciality", "type": "semiCombo", "reference": {"key": "healthcare"}, "label": "Specialties"},
"heating": {"key": "heating", "type": "check", "label": "Heating"},
"height_building": {"key": "height", "minValue": 0, "type": "number", "label": "Building Height (Meters)", "prerequisiteTag": {"key": "building", "valueNot": "no"}},
"height": {"key": "height", "minValue": 0, "type": "number", "label": "Height (Meters)"},
"highspeed": {"key": "highspeed", "type": "check", "label": "High-Speed"},
@@ -377,7 +378,7 @@
"resort": {"key": "resort", "type": "combo", "label": "Type"},
"resource": {"key": "resource", "type": "semiCombo", "label": "Resources"},
"restriction": {"key": "restriction", "type": "combo", "label": "Type"},
"restrictions": {"type": "restrictions", "geometry": ["vertex"], "icon": "iD-restrictions", "reference": {"rtype": "restriction"}, "label": "Turn Restrictions"},
"restrictions": {"type": "restrictions", "geometry": ["vertex"], "icon": "iD-restrictions", "usage": "manual", "reference": {"rtype": "restriction"}, "label": "Turn Restrictions"},
"roof/colour": {"key": "roof:colour", "type": "combo", "label": "Roof Color"},
"room": {"key": "room", "type": "combo", "label": "Type"},
"rooms": {"key": "rooms", "type": "number", "minValue": 0, "label": "Rooms"},
@@ -483,7 +484,7 @@
"trench": {"key": "trench", "type": "combo", "label": "Type"},
"trolley_wire": {"key": "trolley_wire", "type": "check", "label": "Overhead Trolley Wires"},
"tunnel_combo": {"key": "tunnel", "type": "combo", "label": "Type"},
"tunnel": {"key": "tunnel", "type": "typeCombo", "label": "Type", "placeholder": "Default"},
"tunnel": {"key": "tunnel", "type": "typeCombo", "label": "Type", "usage": "group", "placeholder": "Default"},
"usage_rail": {"key": "usage", "type": "combo", "label": "Usage Type", "strings": {"options": {"main": "Main", "branch": "Branch", "industrial": "Industrial", "military": "Military", "test": "Test", "tourism": "Tourism"}}},
"utility_semi": {"key": "utility", "type": "semiCombo", "label": "Utilities"},
"utility": {"key": "utility", "type": "typeCombo", "label": "Utility"},
+1
View File
@@ -2,5 +2,6 @@
"key": "bridge",
"type": "typeCombo",
"label": "Type",
"usage": "group",
"placeholder": "Default"
}
+1
View File
@@ -2,5 +2,6 @@
"key": "comment",
"type": "textarea",
"label": "Changeset Comment",
"usage": "changeset",
"placeholder": "Brief description of your contributions (required)"
}
+1
View File
@@ -2,5 +2,6 @@
"key": "cutting",
"type": "typeCombo",
"label": "Type",
"usage": "group",
"placeholder": "Default"
}
+1
View File
@@ -2,5 +2,6 @@
"key": "embankment",
"type": "typeCombo",
"label": "Type",
"usage": "group",
"placeholder": "Default"
}
+1
View File
@@ -2,5 +2,6 @@
"key": "ford",
"type": "typeCombo",
"label": "Type",
"usage": "group",
"placeholder": "Default"
}
+1
View File
@@ -2,5 +2,6 @@
"key": "hashtags",
"type": "semiCombo",
"label": "Hashtags",
"usage": "changeset",
"placeholder": "#example"
}
+10
View File
@@ -0,0 +1,10 @@
{
"key": "heating",
"type": "check",
"label": "Heating",
"terms": [
"firepit",
"fireplace",
"heater"
]
}
+1
View File
@@ -2,6 +2,7 @@
"type": "restrictions",
"geometry": ["vertex"],
"icon": "iD-restrictions",
"usage": "manual",
"reference": {
"rtype": "restriction"
},
+1
View File
@@ -2,5 +2,6 @@
"key": "tunnel",
"type": "typeCombo",
"label": "Type",
"usage": "group",
"placeholder": "Default"
}
+2 -2
View File
@@ -162,7 +162,7 @@
"amenity/parking_space/disabled": {"icon": "temaki-accessible_space", "geometry": ["area", "point", "vertex"], "tags": {"amenity": "parking_space", "parking_space": "disabled"}, "addTags": {"amenity": "parking_space", "parking_space": "disabled", "capacity": "1"}, "terms": ["disability", "disabled parking stall", "handicap parking spot", "wheelchair"], "matchScore": 0.95, "name": "Accessible Parking Space"},
"amenity/parking": {"icon": "temaki-car_parked", "fields": ["operator", "operator/type", "parking", "capacity_parking", "capacity/disabled_parking", "access_simple", "fee", "payment_multi_fee", "charge_fee", "surface"], "moreFields": ["address", "covered", "email", "fax", "maxstay", "name", "opening_hours", "opening_hours/covid19", "park_ride", "phone", "ref", "supervised", "website", "wheelchair"], "geometry": ["area", "point", "vertex"], "tags": {"amenity": "parking"}, "terms": ["automobile parking", "car lot", "car parking", "rv parking", "truck parking", "vehicle parking"], "name": "Parking Lot"},
"amenity/parking/multi-storey": {"icon": "temaki-car_structure", "fields": ["name", "{amenity/parking}", "building"], "moreFields": ["{amenity/parking}", "height", "building/levels"], "geometry": ["area"], "tags": {"amenity": "parking", "parking": "multi-storey"}, "addTags": {"building": "parking", "amenity": "parking", "parking": "multi-storey"}, "reference": {"key": "parking", "value": "multi-storey"}, "terms": ["car", "indoor parking", "multistorey car park", "parkade", "parking building", "parking deck", "parking garage", "parking ramp", "parking structure"], "name": "Multilevel Parking Garage"},
"amenity/parking/park_ride": {"icon": "temaki-sign_and_car", "geometry": ["area", "point", "vertex"], "tags": {"amenity": "parking", "park_ride": "yes"}, "reference": {"key": "park_ride", "value": "yes"}, "terms": ["commuter parking lot", "incentive parking lot", "metro parking lot", "park and pool lot", "park and ride lot", "P+R", "public transport parking lot", "public transit parking lot", "train parking lot"], "matchScore": 0.95, "name": "Park & Ride Lot"},
"amenity/parking/park_ride": {"icon": "temaki-sign_and_car", "fields": ["name", "{amenity/parking}"], "geometry": ["area", "point", "vertex"], "tags": {"amenity": "parking", "park_ride": "yes"}, "reference": {"key": "park_ride", "value": "yes"}, "terms": ["commuter parking lot", "incentive parking lot", "metro parking lot", "park and pool lot", "park and ride lot", "P+R", "public transport parking lot", "public transit parking lot", "train parking lot"], "matchScore": 0.95, "name": "Park & Ride Lot"},
"amenity/parking/underground": {"icon": "temaki-car_structure", "fields": ["{amenity/parking}", "layer"], "geometry": ["area", "point", "vertex"], "tags": {"amenity": "parking", "parking": "underground"}, "addTags": {"amenity": "parking", "parking": "underground", "layer": "-1"}, "reference": {"key": "parking", "value": "underground"}, "terms": ["automobile parking", "car lot", "car parking", "rv parking", "subsurface parking", "truck parking", "vehicle parking"], "name": "Underground Parking"},
"amenity/payment_centre": {"icon": "temaki-money_hand", "fields": ["name", "brand", "address", "building_area", "opening_hours", "opening_hours/covid19", "payment_multi"], "moreFields": ["currency_multi", "email", "fax", "level", "phone", "website", "wheelchair"], "geometry": ["point", "area"], "terms": ["check", "tax pay", "bill pay", "currency", "finance", "cash", "money"], "tags": {"amenity": "payment_centre"}, "name": "Payment Center"},
"amenity/payment_terminal": {"icon": "far-credit-card", "fields": ["name", "brand", "address", "opening_hours", "opening_hours/covid19", "payment_multi"], "moreFields": ["covered", "currency_multi", "indoor", "level", "wheelchair"], "geometry": ["point"], "terms": ["interactive kiosk", "ekiosk", "atm", "bill pay", "tax pay", "phone pay", "finance", "cash", "money transfer", "card"], "tags": {"amenity": "payment_terminal"}, "name": "Payment Terminal"},
@@ -704,7 +704,7 @@
"leisure/marina": {"icon": "temaki-sailboat", "fields": ["name", "operator", "capacity", "fee", "payment_multi_fee", "charge_fee", "sanitary_dump_station", "power_supply"], "moreFields": ["address", "email", "fax", "gnis/feature_id", "internet_access", "internet_access/fee", "internet_access/ssid", "phone", "seamark/type", "vhf", "website"], "geometry": ["area", "point", "vertex"], "terms": ["boats", "docks", "harbor", "harbour", "moorings", "yachts"], "tags": {"leisure": "marina"}, "addTags": {"leisure": "marina", "seamark:type": "harbour", "seamark:harbour:category": "marina"}, "name": "Marina"},
"leisure/miniature_golf": {"icon": "temaki-golf_green", "fields": ["name", "operator", "address", "opening_hours", "opening_hours/covid19", "fee", "payment_multi_fee", "charge_fee"], "moreFields": ["email", "fax", "gnis/feature_id", "phone", "website"], "geometry": ["area", "point"], "terms": ["crazy golf", "mini golf", "putt-putt"], "tags": {"leisure": "miniature_golf"}, "name": "Miniature Golf"},
"leisure/nature_reserve": {"icon": "maki-park", "geometry": ["area", "point"], "fields": ["name", "operator", "address", "opening_hours", "opening_hours/covid19"], "moreFields": ["dog", "email", "fax", "gnis/feature_id", "phone", "website"], "tags": {"leisure": "nature_reserve"}, "terms": ["protected", "wildlife"], "name": "Nature Reserve"},
"leisure/outdoor_seating": {"icon": "maki-picnic-site", "geometry": ["point", "area"], "fields": ["name", "operator"], "moreFields": ["level"], "terms": ["al fresco", "beer garden", "dining", "cafe", "restaurant", "pub", "bar", "patio"], "tags": {"leisure": "outdoor_seating"}, "name": "Outdoor Seating Area"},
"leisure/outdoor_seating": {"icon": "maki-picnic-site", "geometry": ["point", "area"], "fields": ["name", "operator", "capacity", "lit", "seasonal", "heating"], "moreFields": ["level", "wheelchair"], "terms": ["al fresco", "beer garden", "dining", "cafe", "restaurant", "pub", "bar", "patio"], "tags": {"leisure": "outdoor_seating"}, "name": "Outdoor Seating Area"},
"leisure/park": {"icon": "temaki-tree_and_bench", "fields": ["name", "operator", "address", "opening_hours", "opening_hours/covid19"], "moreFields": ["dog", "email", "fax", "gnis/feature_id", "phone", "smoking", "website"], "geometry": ["area", "point"], "terms": ["esplanade", "estate", "forest", "garden", "grass", "green", "grounds", "lawn", "lot", "meadow", "parkland", "place", "playground", "plaza", "pleasure garden", "recreation area", "square", "tract", "village green", "woodland"], "tags": {"leisure": "park"}, "name": "Park"},
"leisure/picnic_table": {"icon": "maki-picnic-site", "fields": ["material", "lit", "bench", "colour"], "moreFields": ["height", "level", "manufacturer", "operator"], "geometry": ["point"], "tags": {"leisure": "picnic_table"}, "terms": ["bench"], "name": "Picnic Table"},
"leisure/picnic_table/chess": {"icon": "fas-chess-pawn", "geometry": ["point"], "tags": {"leisure": "picnic_table", "sport": "chess"}, "reference": {"key": "sport", "value": "chess"}, "terms": ["bench", "chess board", "checkerboard", "checkers", "chequerboard", "game table"], "name": "Chess Table"},
@@ -1,5 +1,9 @@
{
"icon": "temaki-sign_and_car",
"fields": [
"name",
"{amenity/parking}"
],
"geometry": [
"area",
"point",
@@ -6,10 +6,15 @@
],
"fields": [
"name",
"operator"
"operator",
"capacity",
"lit",
"seasonal",
"heating"
],
"moreFields": [
"level"
"level",
"wheelchair"
],
"terms": [
"al fresco",
+5
View File
@@ -222,6 +222,11 @@
"pattern": {
"description": "Regular expression that a valid `identifier` value is expected to match",
"type": "string"
},
"usage": {
"description": "The manner and context in which the field is used",
"type": "string",
"enum": ["preset", "changeset", "manual", "group"]
}
},
"additionalProperties": false
+1
View File
@@ -1587,6 +1587,7 @@
{"key": "handrail", "description": "🄵 Handrail"},
{"key": "hashtags", "description": "🄵 Hashtags"},
{"key": "healthcare:speciality", "description": "🄵 Specialties"},
{"key": "heating", "description": "🄵 Heating"},
{"key": "height", "description": "🄵 Building Height (Meters), 🄵 Height (Meters)"},
{"key": "highspeed", "description": "🄵 High-Speed"},
{"key": "historic:civilization", "description": "🄵 Historic Civilization"},
+3
View File
@@ -3843,6 +3843,9 @@
"healthcare/speciality": {
"label": "Specialties"
},
"heating": {
"label": "Heating"
},
"height_building": {
"label": "Building Height (Meters)",
"terms": ""
+1 -1
View File
@@ -106,7 +106,7 @@
"phantomjs-prebuilt": "~2.1.11",
"postcss": "^8.1.1",
"postcss-selector-prepend": "^0.5.0",
"rollup": "~2.30.0",
"rollup": "~2.31.0",
"rollup-plugin-includepaths": "~0.2.3",
"rollup-plugin-progress": "^1.1.1",
"rollup-plugin-visualizer": "~4.1.1",
+12
View File
@@ -659,6 +659,8 @@ function validatePresetFields(presets, fields) {
const betweenBracketsRegex = /([^{]*?)(?=\})/;
const maxFieldsBeforeError = 10;
let usedFieldIDs = new Set();
for (let presetID in presets) {
let preset = presets[presetID];
@@ -685,6 +687,7 @@ function validatePresetFields(presets, fields) {
for (let fieldIndex in preset[fieldsKey]) {
let fieldID = preset[fieldsKey][fieldIndex];
usedFieldIDs.add(fieldID);
let field = fields[fieldID];
if (field) {
if (field.geometry) {
@@ -738,6 +741,15 @@ function validatePresetFields(presets, fields) {
}
}
}
for (var fieldID in fields) {
if (!usedFieldIDs.has(fieldID) &&
fields[fieldID].universal !== true &&
(fields[fieldID].usage || 'preset') === 'preset') {
console.log('Field "' + fields[fieldID].label + '" (' + fieldID + ') isn\'t used by any presets.');
}
}
}
function validateDefaults(defaults, categories, presets) {