2023-06-06 00:01:01 +02:00
|
|
|
<script lang="ts">
|
2023-12-03 02:51:43 +01:00
|
|
|
import Translations from "../i18n/Translations"
|
|
|
|
import { Store } from "../../Logic/UIEventSource"
|
|
|
|
import Tr from "../Base/Tr.svelte"
|
|
|
|
import Mapillary_black from "../../assets/svg/Mapillary_black.svelte"
|
|
|
|
import { Mapillary } from "../../Logic/ImageProviders/Mapillary"
|
2023-06-06 00:01:01 +02:00
|
|
|
|
2023-12-03 02:51:43 +01:00
|
|
|
/*
|
|
|
|
A subtleButton which opens mapillary in a new tab at the current location
|
|
|
|
*/
|
2023-06-06 00:01:01 +02:00
|
|
|
|
2023-06-14 20:39:36 +02:00
|
|
|
export let mapProperties: {
|
|
|
|
readonly zoom: Store<number>
|
|
|
|
readonly location: Store<{ lon: number; lat: number }>
|
|
|
|
}
|
|
|
|
let location = mapProperties.location
|
|
|
|
let zoom = mapProperties.zoom
|
2023-12-02 03:12:34 +01:00
|
|
|
let mapillaryLink = Mapillary.createLink($location, $zoom)
|
2023-06-06 00:01:01 +02:00
|
|
|
</script>
|
|
|
|
|
2023-06-14 20:44:01 +02:00
|
|
|
<a class="button flex items-center" href={mapillaryLink} target="_blank">
|
2023-12-01 15:23:28 +01:00
|
|
|
<Mapillary_black class="m-2 mr-4 h-12 w-12 shrink-0" />
|
2023-06-14 20:39:36 +02:00
|
|
|
<div class="flex flex-col">
|
|
|
|
<Tr t={Translations.t.general.attribution.openMapillary} />
|
|
|
|
<Tr cls="subtle" t={Translations.t.general.attribution.mapillaryHelp} />
|
|
|
|
</div>
|
2023-06-06 00:01:01 +02:00
|
|
|
</a>
|