forked from MapComplete/MapComplete
Fix: fix link in attributed images, as reported by Luna
This commit is contained in:
parent
48a340de78
commit
aead4c4809
1 changed files with 3 additions and 2 deletions
|
@ -26,13 +26,14 @@ export default class PanoramaxImageProvider extends ImageProvider {
|
||||||
private static knownMeta: Record<string, { data: ImageData; time: Date }> = {}
|
private static knownMeta: Record<string, { data: ImageData; time: Date }> = {}
|
||||||
|
|
||||||
public SourceIcon(
|
public SourceIcon(
|
||||||
img?: { id: string; url: string; host?: string },
|
img?: { id: string; url: string },
|
||||||
location?: {
|
location?: {
|
||||||
lon: number
|
lon: number
|
||||||
lat: number
|
lat: number
|
||||||
}
|
}
|
||||||
): BaseUIElement {
|
): BaseUIElement {
|
||||||
const p = new Panoramax(img.host)
|
const host = ("https://" + new URL(img.url).host)
|
||||||
|
const p = new Panoramax(host)
|
||||||
return new Link(
|
return new Link(
|
||||||
new SvelteUIElement(Panoramax_bw),
|
new SvelteUIElement(Panoramax_bw),
|
||||||
p.createViewLink({
|
p.createViewLink({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue