X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/0af7af382b5cf0cb446fa1c0084d38609c543daf..23ad83a45b7cb0fb0c07109230e869ab2cb7b3b5:/src/components/Header.svelte diff --git a/src/components/Header.svelte b/src/components/Header.svelte index 777d8b8..0d678bd 100644 --- a/src/components/Header.svelte +++ b/src/components/Header.svelte @@ -4,10 +4,23 @@ 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.toFixed(5); + map_lon = map.getCenter().lng.toFixed(5); + }); + });