X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/23d68e84c00ba741a29e4e088ef12aa7b23e045c..cf3e8f8daa0f2f4b014b9df6c32a436248237140:/src/components/SearchSectionReverse.svelte diff --git a/src/components/SearchSectionReverse.svelte b/src/components/SearchSectionReverse.svelte index 1861902..70174b6 100644 --- a/src/components/SearchSectionReverse.svelte +++ b/src/components/SearchSectionReverse.svelte @@ -7,6 +7,7 @@ export let lat = ''; export let lon = ''; export let zoom = ''; + export let api_request_params = {}; function gotoCoordinates(newlat, newlon, newzoom) { if (newlat === null || newlon === null) return; @@ -29,35 +30,42 @@ // 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]); } } + function set_api_param(e) { + document.querySelector('input[name=' + e.target.dataset.apiParam + ']').value = e.target.value; + } -
+
+
+
- -
+
+
+
-
+
- {#each zoomLevels() as zoomTitle, i} {/each}
-
+ +
+ +
+ Advanced options +
    +
  • + + +
  • +
+
+