forked from MapComplete/MapComplete
More tweaks to the linked data loader
This commit is contained in:
parent
684932aebd
commit
734be4a702
5 changed files with 76 additions and 55 deletions
|
@ -1833,8 +1833,15 @@ export default class SpecialVisualizations {
|
|||
})()
|
||||
)
|
||||
}
|
||||
return Stores.FromPromiseWithErr(
|
||||
LinkedDataLoader.fetchJsonLd(url, { country }, useProxy)
|
||||
return Stores.FromPromiseWithErr((async () => {
|
||||
try {
|
||||
|
||||
return await LinkedDataLoader.fetchJsonLd(url, { country }, useProxy ? "proxy" : "fetch-lod")
|
||||
} catch (e) {
|
||||
console.log("Could not get with proxy/download LOD, attempting to download directly. Error for ",url,"is",e)
|
||||
return await LinkedDataLoader.fetchJsonLd(url, { country }, "fetch-raw")
|
||||
}
|
||||
})()
|
||||
)
|
||||
})
|
||||
|
||||
|
@ -1850,7 +1857,8 @@ export default class SpecialVisualizations {
|
|||
layer,
|
||||
externalData,
|
||||
sourceUrl,
|
||||
readonly
|
||||
readonly,
|
||||
collapsed: isClosed
|
||||
}),
|
||||
undefined,
|
||||
url.map((url) => !!url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue