forked from MapComplete/MapComplete
Merge master
This commit is contained in:
commit
3659276351
84 changed files with 3508 additions and 3472 deletions
|
@ -124,9 +124,7 @@ export default abstract class ImageProvider {
|
|||
value: string
|
||||
): undefined | ProvidedImage[] | Promise<ProvidedImage[]>
|
||||
|
||||
public abstract DownloadAttribution(providedImage: {
|
||||
id: string
|
||||
}): Promise<LicenseInfo>
|
||||
public abstract DownloadAttribution(providedImage: { id: string }): Promise<LicenseInfo>
|
||||
|
||||
public abstract apiUrls(): string[]
|
||||
|
||||
|
@ -142,7 +140,7 @@ export default abstract class ImageProvider {
|
|||
id: string
|
||||
}): Promise<Feature<Point, PanoramaView>> | undefined
|
||||
|
||||
public static async offerImageAsDownload(image: { url_hd?: string, url: string }) {
|
||||
public static async offerImageAsDownload(image: { url_hd?: string; url: string }) {
|
||||
const response = await fetch(image.url_hd ?? image.url)
|
||||
const blob = await response.blob()
|
||||
Utils.offerContentsAsDownloadableFile(blob, new URL(image.url).pathname.split("/").at(-1), {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue