forked from MapComplete/MapComplete
Fix: don't hint on images if they are blacklisted
This commit is contained in:
parent
518a426805
commit
4f419b9321
1 changed files with 6 additions and 1 deletions
|
@ -75,6 +75,7 @@ export default class AllImageProviders {
|
|||
* AllImageProviders.estimateNumberOfImages({image:"abc", "mapillary": "123", "panoramax:0": "xyz"}) // => 3
|
||||
* AllImageProviders.estimateNumberOfImages({wikidata:"Q123", "wikipedia": "nl:xyz"}) // => 0
|
||||
*
|
||||
* AllImageProviders.estimateNumberOfImages({image:"https://photos.app.goo.gl/tjt5FsQZtpkQRVw38"}) // => 0
|
||||
*
|
||||
*/
|
||||
public static estimateNumberOfImages(
|
||||
|
@ -94,7 +95,11 @@ export default class AllImageProviders {
|
|||
)
|
||||
for (const prefix of allPrefixes) {
|
||||
for (const k in tags) {
|
||||
if (!tags[k]) {
|
||||
const v = tags[k]
|
||||
if (!v) {
|
||||
continue
|
||||
}
|
||||
if (AllImageProviders.dontLoadFromPrefixes.some(prefix => v.startsWith(prefix))) {
|
||||
continue
|
||||
}
|
||||
if (k === prefix || k.startsWith(prefix + ":")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue