forked from MapComplete/MapComplete
Fix: license info in 'nearby images' now works for mapillary, add bbox search for panoramax
This commit is contained in:
parent
14fd4e0f4f
commit
7f5544c1e5
6 changed files with 47 additions and 15 deletions
|
@ -37,18 +37,29 @@
|
|||
}
|
||||
})
|
||||
const t = Translations.t.image.nearby
|
||||
|
||||
let date: Date
|
||||
if (image.date) {
|
||||
try {
|
||||
date = new Date(image.date)
|
||||
} catch (e) {
|
||||
console.warn("Could not parse image date", image.date, "for", image.detailsUrl)
|
||||
}
|
||||
}
|
||||
|
||||
let license: LicenseInfo = {
|
||||
artist: image.author,
|
||||
license: image.license,
|
||||
date: new Date(image.date),
|
||||
informationLocation: image.detailsUrl,
|
||||
informationLocation: (image.detailsUrl ?? image.pictureUrl ?? image.thumbUrl),
|
||||
date
|
||||
}
|
||||
console.log(">>> trying to create license info based on", image, license)
|
||||
let providedImage: ProvidedImage = {
|
||||
url: image.thumbUrl ?? image.pictureUrl,
|
||||
url_hd: image.pictureUrl,
|
||||
key: undefined,
|
||||
provider: AllImageProviders.byName(image.provider),
|
||||
date: new Date(image.date),
|
||||
date,
|
||||
id: Object.values(image.osmTags)[0],
|
||||
isSpherical: image.details.isSpherical,
|
||||
license,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue