forked from MapComplete/MapComplete
Performance: cache panoramax requests more aggressively; reuse license information that comes from the search-api; lower picture limit; should relieve #2384 greatly
This commit is contained in:
parent
bd287fd8b0
commit
549129671a
7 changed files with 53 additions and 45 deletions
|
@ -18,6 +18,7 @@
|
|||
import { Utils } from "../../Utils"
|
||||
import ThemeViewState from "../../Models/ThemeViewState"
|
||||
import { MenuState } from "../../Models/MenuState"
|
||||
import { LicenseInfo } from "../../Logic/ImageProviders/LicenseInfo"
|
||||
|
||||
export let tags: UIEventSource<OsmTags>
|
||||
export let state: ThemeViewState
|
||||
|
@ -36,7 +37,13 @@
|
|||
}
|
||||
})
|
||||
const t = Translations.t.image.nearby
|
||||
const providedImage: ProvidedImage = {
|
||||
let license: LicenseInfo = {
|
||||
artist: image.author,
|
||||
license: image.license,
|
||||
date: new Date(image.date),
|
||||
informationLocation: image.detailsUrl
|
||||
}
|
||||
let providedImage: ProvidedImage = {
|
||||
url: image.thumbUrl ?? image.pictureUrl,
|
||||
url_hd: image.pictureUrl,
|
||||
key: undefined,
|
||||
|
@ -44,6 +51,7 @@
|
|||
date: new Date(image.date),
|
||||
id: Object.values(image.osmTags)[0],
|
||||
isSpherical: image.details.isSpherical,
|
||||
license
|
||||
}
|
||||
|
||||
async function applyLink(isLinked: boolean) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue