forked from MapComplete/MapComplete
Visualize attribution in the attribution panel
This commit is contained in:
parent
a16745d0d1
commit
12d99e0323
10 changed files with 122 additions and 28 deletions
|
@ -70,7 +70,7 @@ export default class TagRenderingConfig {
|
|||
addExtraTags: json.freeform.addExtraTags?.map((tg, i) =>
|
||||
FromJSON.Tag(tg, `${context}.extratag[${i}]`)) ?? []
|
||||
}
|
||||
if(json.freeform["extraTags"] !== undefined){
|
||||
if (json.freeform["extraTags"] !== undefined) {
|
||||
throw `Freeform.extraTags is defined. This should probably be 'freeform.addExtraTag' (at ${context})`
|
||||
}
|
||||
if (this.freeform.key === undefined || this.freeform.key === "") {
|
||||
|
@ -254,5 +254,16 @@ export default class TagRenderingConfig {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
public ExtractImages(isIcon: boolean): Set<string> {
|
||||
|
||||
const usedIcons = new Set<string>()
|
||||
this.render?.ExtractImages(isIcon)?.forEach(usedIcons.add, usedIcons)
|
||||
|
||||
for (const mapping of this.mappings ?? []) {
|
||||
mapping.then.ExtractImages(isIcon).forEach(usedIcons.add, usedIcons)
|
||||
}
|
||||
|
||||
return usedIcons;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue