X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/0ba857ac4c4edb839832b63010ca8550da701da5..31109c4698b3bf0368d139b3edacd2235bc30853:/src/components/SearchSectionReverse.svelte diff --git a/src/components/SearchSectionReverse.svelte b/src/components/SearchSectionReverse.svelte index d996f44..1861902 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); @@ -44,6 +46,7 @@ type="text" class="form-control form-control-sm" placeholder="latitude" + pattern="^-?\d+(\.\d+)?$" bind:value={lat} on:change={maybeSplitLatitude} /> @@ -60,6 +63,7 @@ type="text" class="form-control form-control-sm" placeholder="longitude" + pattern="^-?\d+(\.\d+)?$" bind:value={lon} />