X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/71b9066d9eed97aee7eff27a25d5c317b6f89595..da196b93dcd704e2150e691e2dc588952015b50d:/src/components/Header.svelte diff --git a/src/components/Header.svelte b/src/components/Header.svelte index 06f3bd4..0fbead9 100644 --- a/src/components/Header.svelte +++ b/src/components/Header.svelte @@ -2,11 +2,25 @@ import PageLink from './PageLink.svelte'; import ReverseLink from './ReverseLink.svelte'; import LastUpdated from './LastUpdated.svelte'; + import Error from './Error.svelte'; - import { page } from '../lib/stores.js'; - import { get_config_value } from '../lib/config_reader.js'; + import { map_store, page } from '../lib/stores.js'; $: view = $page.tab; + $: page_title = Nominatim_Config.Page_Title; + $: reverse_only = Nominatim_Config.Reverse_Only; + + let map_lat; + let map_lon; + + map_store.subscribe(map => { + if (!map) return; + + map.on('move', function () { + map_lat = map.getCenter().lat; + map_lon = map.getCenter().lng; + }); + });