Merge branch 'master' into develop

This commit is contained in:
Pieter Vander Vennet 2024-09-18 23:12:06 +02:00
commit fdb71cc93f
26 changed files with 280 additions and 123 deletions

View file

@ -12,7 +12,7 @@ export class Imgur extends ImageProvider implements ImageUploader {
public readonly defaultKeyPrefixes: string[] = ["image"]
public readonly maxFileSizeInMegabytes = 10
public static readonly apiUrl = "https://api.imgur.com/3/image"
public static readonly supportingUrls = ["https://i.imgur.com"]
private constructor() {
super()
}

View file

@ -9,6 +9,7 @@ import { Utils } from "../../Utils"
import { Point } from "geojson"
import MvtSource from "../FeatureSource/Sources/MvtSource"
import AllImageProviders from "../ImageProviders/AllImageProviders"
import { Imgur } from "../ImageProviders/Imgur"
interface ImageFetcher {
/**
@ -353,7 +354,7 @@ type P4CService = (typeof P4CImageFetcher.services)[number]
export class CombinedFetcher {
private readonly sources: ReadonlyArray<CachedFetcher>
public static apiUrls = P4CImageFetcher.apiUrls
public static apiUrls = [...P4CImageFetcher.apiUrls, Imgur.apiUrl, ...Imgur.supportingUrls]
constructor(radius: number, maxage: Date, indexedFeatures: IndexedFeatureSource) {
this.sources = [