X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/0ba857ac4c4edb839832b63010ca8550da701da5..756b2012925520a112766bde78da05be0a5a22ba:/src/components/SearchSectionReverse.svelte diff --git a/src/components/SearchSectionReverse.svelte b/src/components/SearchSectionReverse.svelte index d996f44..2f53f39 100644 --- a/src/components/SearchSectionReverse.svelte +++ b/src/components/SearchSectionReverse.svelte @@ -9,6 +9,8 @@ export let zoom = ''; function gotoCoordinates(newlat, newlon, newzoom) { + if (newlat === null || newlon === null) return; + let params = new URLSearchParams(); params.set('lat', newlat); params.set('lon', newlon); @@ -27,7 +29,7 @@ // common mistake is to copy&paste latitude and longitude into the 'lat' search box function maybeSplitLatitude(e) { - var coords_split = e.target.value.split(','); + var coords_split = e.target.value.split(/,|%2C/); if (coords_split.length === 2) { document.querySelector('input[name=lat]').value = L.Util.trim(coords_split[0]); document.querySelector('input[name=lon]').value = L.Util.trim(coords_split[1]); @@ -37,50 +39,58 @@ -
+
+
+
-
+ -
+
+
+
-
+
- {#each zoomLevels() as zoomTitle, i} {/each}
-
+