forked from MapComplete/MapComplete
Themes(cafe_pub, toilets): add toilet information to pubs; forward wheelchair accessibility information to 'toilet_at_amenity'
This commit is contained in:
parent
7a0eed35e3
commit
455b2c641c
9 changed files with 75 additions and 118 deletions
|
|
@ -13,6 +13,7 @@
|
|||
export let selectedElement: Feature
|
||||
export let tags: UIEventSource<OsmTags>
|
||||
export let labels: string[]
|
||||
export let blacklist: string[]
|
||||
export let header: string
|
||||
export let layer: LayerConfig
|
||||
|
||||
|
|
@ -22,11 +23,15 @@
|
|||
}
|
||||
let tagRenderings: TagRenderingConfig[] = []
|
||||
let seenIds = new Set<string>()
|
||||
let blacklistSet = new Set(blacklist)
|
||||
for (const label of labels) {
|
||||
for (const tr of layer.tagRenderings) {
|
||||
if (seenIds.has(tr.id)) {
|
||||
continue
|
||||
}
|
||||
if (blacklistSet.has(tr.id) || tr.labels.some(l => blacklistSet.has(l))) {
|
||||
continue
|
||||
}
|
||||
if (label === tr.id || tr.labels.some((l) => l === label)) {
|
||||
tagRenderings.push(tr)
|
||||
seenIds.add(tr.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue