X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/a626c30095620f913366ef2c7db705f66ecdb988..daea333875ff6b51d99dea24997019e573e201c2:/src/components/SearchSectionReverse.svelte diff --git a/src/components/SearchSectionReverse.svelte b/src/components/SearchSectionReverse.svelte index a455a4e..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,13 +30,16 @@ // 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; + } @@ -53,10 +57,10 @@ on:change={maybeSplitLatitude} />
- gotoCoordinates(lon, lat)} class="btn btn-outline-secondary btn-sm" - title="switch lat and lon"><> + title="switch lat and lon"><>
@@ -81,11 +85,27 @@ {/each}
+
+ +
+ Advanced options + +
+