forked from MapComplete/MapComplete
UX: add proper delete dialog, add option to report images
This commit is contained in:
parent
8690ad35bb
commit
5b618dc367
18 changed files with 334 additions and 176 deletions
|
@ -138,11 +138,12 @@ export default class PanoramaxImageProvider extends ImageProvider {
|
|||
}
|
||||
return data?.some(
|
||||
(img) =>
|
||||
img?.status !== undefined && img?.status !== "ready" && img?.status !== "broken"
|
||||
img?.status !== undefined && img?.status !== "ready" && img?.status !== "broken" && img?.status !== "hidden"
|
||||
)
|
||||
}
|
||||
|
||||
Stores.Chronic(1500, () => hasLoading(source.data)).addCallback((_) => {
|
||||
console.log("Testing panoramax URLS again as some were loading", source.data, hasLoading(source.data))
|
||||
super.getRelevantUrlsFor(tags, prefixes).then((data) => {
|
||||
source.set(data)
|
||||
return !hasLoading(data)
|
||||
|
@ -168,6 +169,17 @@ export default class PanoramaxImageProvider extends ImageProvider {
|
|||
public apiUrls(): string[] {
|
||||
return ["https://panoramax.mapcomplete.org", "https://panoramax.xyz"]
|
||||
}
|
||||
|
||||
public static getPanoramaxInstance (host: string){
|
||||
host = new URL(host).host
|
||||
if(new URL(this.defaultPanoramax.host).host === host){
|
||||
return this.defaultPanoramax
|
||||
}
|
||||
if(new URL(this.xyz.host).host === host){
|
||||
return this.xyz
|
||||
}
|
||||
return new Panoramax(host)
|
||||
}
|
||||
}
|
||||
|
||||
export class PanoramaxUploader implements ImageUploader {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue