2023-09-16 02:30:01 +02:00
|
|
|
<script lang="ts">
|
2023-09-21 15:29:34 +02:00
|
|
|
import { Store } from "../../Logic/UIEventSource"
|
|
|
|
import type { OsmTags } from "../../Models/OsmFeature"
|
|
|
|
import type { SpecialVisualizationState } from "../SpecialVisualization"
|
|
|
|
import type { Feature } from "geojson"
|
|
|
|
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
|
|
|
import Translations from "../i18n/Translations"
|
|
|
|
import Tr from "../Base/Tr.svelte"
|
|
|
|
import NearbyImages from "./NearbyImages.svelte"
|
|
|
|
import Svg from "../../Svg"
|
|
|
|
import ToSvelte from "../Base/ToSvelte.svelte"
|
|
|
|
import { XCircleIcon } from "@babeard/svelte-heroicons/solid"
|
|
|
|
import exp from "constants"
|
2023-09-16 02:30:01 +02:00
|
|
|
|
2023-09-21 15:29:34 +02:00
|
|
|
export let tags: Store<OsmTags>
|
|
|
|
export let state: SpecialVisualizationState
|
|
|
|
export let lon: number
|
|
|
|
export let lat: number
|
|
|
|
export let feature: Feature
|
2023-09-16 02:30:01 +02:00
|
|
|
|
2023-09-21 15:29:34 +02:00
|
|
|
export let linkable: boolean = true
|
|
|
|
export let layer: LayerConfig
|
|
|
|
const t = Translations.t.image.nearby
|
2023-09-16 02:30:01 +02:00
|
|
|
|
2023-09-21 15:29:34 +02:00
|
|
|
let expanded = false
|
2023-09-16 02:30:01 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{#if expanded}
|
2023-09-16 02:50:01 +02:00
|
|
|
<NearbyImages {tags} {state} {lon} {lat} {feature} {linkable}>
|
2023-09-21 15:29:34 +02:00
|
|
|
<XCircleIcon
|
|
|
|
slot="corner"
|
|
|
|
class="h-6 w-6 cursor-pointer"
|
|
|
|
on:click={() => {
|
|
|
|
expanded = false
|
|
|
|
}}
|
|
|
|
/>
|
2023-09-16 02:50:01 +02:00
|
|
|
</NearbyImages>
|
2023-09-16 02:30:01 +02:00
|
|
|
{:else}
|
2023-09-21 15:29:34 +02:00
|
|
|
<button
|
|
|
|
class="flex w-full items-center"
|
|
|
|
on:click={() => {
|
|
|
|
expanded = true
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<ToSvelte construct={Svg.camera_plus_svg().SetClass("block w-8 h-8 p-1 mr-2 ")} />
|
|
|
|
<Tr t={t.seeNearby} />
|
|
|
|
</button>
|
2023-09-16 02:30:01 +02:00
|
|
|
{/if}
|