forked from MapComplete/MapComplete
Don't attempt to load 'Category:'-values as images directly
This commit is contained in:
parent
c5b4498b2b
commit
3d4f18ca04
2 changed files with 8 additions and 7 deletions
|
@ -17,13 +17,15 @@ export default class AllImageProviders {
|
|||
Mapillary.singleton,
|
||||
WikidataImageProvider.singleton,
|
||||
WikimediaImageProvider.singleton,
|
||||
// The 'genericImageProvider' is a fallback that scans various other tags for tags, unless the URL starts with one of the given prefixes
|
||||
new GenericImageProvider(
|
||||
[].concat(
|
||||
[
|
||||
...Imgur.defaultValuePrefix,
|
||||
...WikimediaImageProvider.commonsPrefixes,
|
||||
...Mapillary.valuePrefixes,
|
||||
...AllImageProviders.dontLoadFromPrefixes
|
||||
)
|
||||
...AllImageProviders.dontLoadFromPrefixes,
|
||||
"Category:"
|
||||
]
|
||||
),
|
||||
]
|
||||
public static apiUrls: string[] = [].concat(
|
||||
|
|
|
@ -18,7 +18,8 @@ export default abstract class ImageProvider {
|
|||
public abstract SourceIcon(id?: string, location?: { lon: number; lat: number }): BaseUIElement
|
||||
|
||||
/**
|
||||
* Given a properies object, maps it onto _all_ the available pictures for this imageProvider
|
||||
* Given a properties object, maps it onto _all_ the available pictures for this imageProvider.
|
||||
* This iterates over _all_ tags and matches _anything_ that might be an image
|
||||
*/
|
||||
public GetRelevantUrls(
|
||||
allTags: Store<any>,
|
||||
|
@ -71,7 +72,5 @@ export default abstract class ImageProvider {
|
|||
|
||||
public abstract apiUrls(): string[]
|
||||
|
||||
public backlink(): string | undefined {
|
||||
return undefined
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue