forked from MapComplete/MapComplete
Add wikidata-images to etymology theme, various fixes for custom image carousels and gracious handling of wikidata/wikimedia
This commit is contained in:
parent
54abe7d057
commit
ff11f96e91
10 changed files with 155 additions and 99 deletions
|
@ -17,7 +17,7 @@ export default abstract class ImageProvider {
|
|||
if (cached !== undefined) {
|
||||
return cached;
|
||||
}
|
||||
const src =UIEventSource.FromPromise(this.DownloadAttribution(url))
|
||||
const src = UIEventSource.FromPromise(this.DownloadAttribution(url))
|
||||
this._cache.set(url, src)
|
||||
return src;
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ export default abstract class ImageProvider {
|
|||
}
|
||||
const relevantUrls = new UIEventSource<{ url: string; key: string; provider: ImageProvider }[]>([])
|
||||
const seenValues = new Set<string>()
|
||||
const self = this
|
||||
allTags.addCallbackAndRunD(tags => {
|
||||
for (const key in tags) {
|
||||
if(!prefixes.some(prefix => key.startsWith(prefix))){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue