forked from MapComplete/MapComplete
Allow adding extra tags
This commit is contained in:
parent
8332650ea3
commit
943db6b02d
13 changed files with 57 additions and 70 deletions
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
let maintag = helperArgs[0].toString()
|
||||
let tag = key
|
||||
let addExtraTags = helperArgs[1].split(";")
|
||||
|
||||
const path = `${tag}s/${maintag.split("=")[0]}/${maintag.split("=")[1]}`
|
||||
|
||||
|
|
@ -132,6 +133,11 @@
|
|||
})
|
||||
}
|
||||
|
||||
// If we have layer-defined extra tags, also add them
|
||||
addExtraTags.forEach((extraTag) => {
|
||||
tags[extraTag.split("=")[0]] = extraTag.split("=")[1]
|
||||
})
|
||||
|
||||
// Finally, set the extra tags
|
||||
extraTags.setData(tags)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ export default class NameSuggestionIndexValidator extends Validator {
|
|||
"main",
|
||||
"The main tag to give suggestions for, e.g. `amenity=restaurant`.",
|
||||
],
|
||||
[
|
||||
"addExtraTags",
|
||||
"Extra tags to add to the suggestions, e.g. `nobrand=yes`.",
|
||||
],
|
||||
]
|
||||
),
|
||||
]),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue