mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 15:56:56 +02:00
Prioritize suggestion tags over preset tags
Before it was causing presets with special cuisine tags to not match (e.g. `cuisine=donut;coffee`, `cuisine=ice_cream;burger`)
This commit is contained in:
+7
-2
@@ -250,9 +250,14 @@ function suggestionsToPresets(presets) {
|
||||
return;
|
||||
}
|
||||
|
||||
let wikidataTag = { 'brand:wikidata': qid };
|
||||
let suggestionID = presetID + '/' + name;
|
||||
|
||||
let tags = { 'brand:wikidata': qid };
|
||||
for (k in preset.tags) {
|
||||
// prioritize suggestion tags over preset tags (for `vending`,`cuisine`, etc)
|
||||
tags[k] = suggestion.tags[k] || preset.tags[k];
|
||||
}
|
||||
|
||||
let logoURL;
|
||||
let logoURLs = wikidata[qid] && wikidata[qid].logos;
|
||||
if (logoURLs) {
|
||||
@@ -275,7 +280,7 @@ function suggestionsToPresets(presets) {
|
||||
icon: preset.icon,
|
||||
imageURL: logoURL,
|
||||
geometry: preset.geometry,
|
||||
tags: Object.assign({}, preset.tags, wikidataTag),
|
||||
tags: tags,
|
||||
addTags: suggestion.tags,
|
||||
reference: preset.reference,
|
||||
countryCodes: suggestion.countryCodes,
|
||||
|
||||
@@ -2667,6 +2667,9 @@ en:
|
||||
name: Fish & Chips Fast Food
|
||||
# 'terms: breakfast,cafe,café,dine,dining,dinner,drive-in,eat,grill,lunch,table,french fries'
|
||||
terms: '<translate with synonyms or related terms for ''Fish & Chips Fast Food'', separated by commas>'
|
||||
amenity/fast_food/ice_cream:
|
||||
# 'amenity=fast_food, cuisine=ice_cream'
|
||||
name: Ice Cream Fast Food
|
||||
amenity/fast_food/kebab:
|
||||
# 'amenity=fast_food, cuisine=kebab'
|
||||
name: Kebab Fast Food
|
||||
|
||||
+3157
-3156
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -108,6 +108,7 @@
|
||||
{"key": "amenity", "value": "driving_school", "description": "🄿 Driving School", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/car-15.svg?sanitize=true"},
|
||||
{"key": "amenity", "value": "events_venue", "description": "🄿 Events Venue", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-users.svg?sanitize=true"},
|
||||
{"key": "amenity", "value": "fast_food", "description": "🄿 Fast Food", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/fast-food-15.svg?sanitize=true"},
|
||||
{"key": "cuisine", "value": "ice_cream", "description": "🄿 Ice Cream Fast Food (unsearchable)", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-ice-cream.svg?sanitize=true"},
|
||||
{"key": "cuisine", "value": "burger", "description": "🄿 Burger Fast Food", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/fast-food-15.svg?sanitize=true"},
|
||||
{"key": "cuisine", "value": "chicken", "description": "🄿 Chicken Fast Food", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-drumstick-bite.svg?sanitize=true"},
|
||||
{"key": "cuisine", "value": "donut", "description": "🄿 Donut Fast Food", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/donut.svg?sanitize=true"},
|
||||
@@ -124,7 +125,7 @@
|
||||
{"key": "amenity", "value": "grit_bin", "description": "🄿 Grit Bin", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-box.svg?sanitize=true"},
|
||||
{"key": "amenity", "value": "hospital", "description": "🄿 Hospital Grounds", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/hospital-15.svg?sanitize=true"},
|
||||
{"key": "amenity", "value": "hunting_stand", "description": "🄿 Hunting Stand", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/binoculars.svg?sanitize=true"},
|
||||
{"key": "amenity", "value": "ice_cream", "description": "🄿 Ice Cream Shop", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/ice-cream-15.svg?sanitize=true"},
|
||||
{"key": "amenity", "value": "ice_cream", "description": "🄿 Ice Cream Shop", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/fontawesome/fas-ice-cream.svg?sanitize=true"},
|
||||
{"key": "amenity", "value": "internet_cafe", "description": "🄿 Internet Cafe", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/bhousel/temaki/master/icons/antenna.svg?sanitize=true"},
|
||||
{"key": "amenity", "value": "kindergarten", "description": "🄿 Preschool/Kindergarten Grounds", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/school-15.svg?sanitize=true"},
|
||||
{"key": "amenity", "value": "language_school", "description": "🄿 Language School", "object_types": ["node", "area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/school-15.svg?sanitize=true"},
|
||||
|
||||
Vendored
+5
-1
@@ -4697,6 +4697,10 @@
|
||||
"name": "Fast Food",
|
||||
"terms": "restaurant,takeaway"
|
||||
},
|
||||
"amenity/fast_food/ice_cream": {
|
||||
"name": "Ice Cream Fast Food",
|
||||
"terms": ""
|
||||
},
|
||||
"amenity/fast_food/burger": {
|
||||
"name": "Burger Fast Food",
|
||||
"terms": "breakfast,dine,dining,dinner,drive-in,eat,grill,lunch,table"
|
||||
@@ -9110,7 +9114,7 @@
|
||||
"attribution": {
|
||||
"text": "Terms & Feedback"
|
||||
},
|
||||
"description": "DigitalGlobe-Vivid is a mosiac with optimal aesthetics and currency for any area on the globe, 50cm resolution or better, and image currency <20 month average globally.",
|
||||
"description": "DigitalGlobe-Vivid is a mosaic with optimal aesthetics and currency for any area on the globe, 50cm resolution or better, and image currency <20 month average globally.",
|
||||
"name": "DigitalGlobe Vivid Imagery"
|
||||
},
|
||||
"EOXAT2018CLOUDLESS": {
|
||||
|
||||
Reference in New Issue
Block a user