2023-11-16 03:32:04 +01:00
|
|
|
<script lang="ts">
|
2023-11-23 15:47:16 +01:00
|
|
|
import type { Feature } from "geojson"
|
|
|
|
import type { SpecialVisualizationState } from "../SpecialVisualization"
|
|
|
|
import SelectedElementTitle from "./SelectedElementTitle.svelte"
|
|
|
|
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
|
|
|
import TagRenderingAnswer from "../Popup/TagRendering/TagRenderingAnswer.svelte"
|
2023-11-16 03:32:04 +01:00
|
|
|
|
2023-11-23 15:47:16 +01:00
|
|
|
export let state: SpecialVisualizationState
|
2023-11-16 03:32:04 +01:00
|
|
|
export let feature: Feature
|
|
|
|
let id = feature.properties.id
|
2023-11-23 15:47:16 +01:00
|
|
|
let tags = state.featureProperties.getStore(id)
|
2023-11-16 03:32:04 +01:00
|
|
|
let layer: LayerConfig = state.layout.getMatchingLayer(tags.data)
|
2023-12-06 03:07:15 +01:00
|
|
|
|
|
|
|
function select(){
|
|
|
|
state.selectedElement.setData(undefined)
|
|
|
|
state.selectedLayer.setData(layer)
|
|
|
|
state.selectedElement.setData(feature)
|
|
|
|
}
|
2023-11-16 03:32:04 +01:00
|
|
|
</script>
|
|
|
|
|
2023-12-06 03:07:15 +01:00
|
|
|
<div on:click={() => select()} class="cursor-pointer">
|
2023-11-23 15:47:16 +01:00
|
|
|
<TagRenderingAnswer config={layer.title} selectedElement={feature} {state} {tags} {layer} />
|
2023-12-06 03:07:15 +01:00
|
|
|
</div>
|