Feature: add link to the original provider, see #2387

This commit is contained in:
Pieter Vander Vennet 2025-04-23 21:35:43 +02:00
parent 991925ba35
commit 3e5b1444cc
10 changed files with 51 additions and 5 deletions

View file

@ -8,6 +8,7 @@ import MapillaryIcon from "./MapillaryIcon.svelte"
import { Feature, Point } from "geojson"
export class Mapillary extends ImageProvider {
public static readonly singleton = new Mapillary()
public readonly name = "Mapillary"
@ -237,4 +238,11 @@ export class Mapillary extends ImageProvider {
lon: geometry.coordinates[0],
}
}
public visitUrl(image: { id: string }, location?: { lon: number, lat: number }): (string | undefined) {
if (!image.id) {
return
}
return Mapillary.createLink(location, 17, image.id)
}
}