forked from MapComplete/MapComplete
Feature: improve inspectorGui: add search, placeholder, see #2353
This commit is contained in:
parent
0a67668bec
commit
589909ba44
5 changed files with 123 additions and 51 deletions
|
|
@ -1,25 +1,33 @@
|
|||
<script lang="ts">
|
||||
import { GeocodingUtils } from "../../Logic/Search/GeocodingProvider"
|
||||
import type { GeocodeResult } from "../../Logic/Search/GeocodingProvider"
|
||||
import { GeocodingUtils } from "../../Logic/Search/GeocodingProvider"
|
||||
import { GeoOperations } from "../../Logic/GeoOperations"
|
||||
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
||||
import { UIEventSource } from "../../Logic/UIEventSource"
|
||||
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig"
|
||||
import Icon from "../Map/Icon.svelte"
|
||||
import TagRenderingAnswer from "../Popup/TagRendering/TagRenderingAnswer.svelte"
|
||||
import ArrowUp from "@babeard/svelte-heroicons/mini/ArrowUp"
|
||||
import DefaultIcon from "../Map/DefaultIcon.svelte"
|
||||
import { WithSearchState } from "../../Models/ThemeViewState/WithSearchState"
|
||||
import type { MapProperties } from "../../Models/MapProperties"
|
||||
import ThemeConfig from "../../Models/ThemeConfig/ThemeConfig"
|
||||
import FeaturePropertiesStore from "../../Logic/FeatureSource/Actors/FeaturePropertiesStore"
|
||||
import SearchState from "../../Logic/State/SearchState"
|
||||
import ArrowUp from "@babeard/svelte-heroicons/mini/ArrowUp"
|
||||
|
||||
export let entry: GeocodeResult
|
||||
export let state: WithSearchState
|
||||
export let state: {
|
||||
mapProperties: MapProperties,
|
||||
theme?: ThemeConfig,
|
||||
featureProperties?: FeaturePropertiesStore,
|
||||
searchState: Partial<SearchState>
|
||||
}
|
||||
|
||||
let layer: LayerConfig
|
||||
let tags: UIEventSource<Record<string, string>>
|
||||
let descriptionTr: TagRenderingConfig = undefined
|
||||
if (entry.feature?.properties?.id) {
|
||||
layer = state.theme.getMatchingLayer(entry.feature.properties)
|
||||
tags = state.featureProperties.getStore(entry.feature.properties.id)
|
||||
tags = state.featureProperties?.getStore(entry.feature.properties.id)
|
||||
descriptionTr = layer?.tagRenderings?.find((tr) => tr.labels.indexOf("description") >= 0)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue