]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/pages/ReversePage.svelte
svelte 5.0 => 5.1
[nominatim-ui.git] / src / pages / ReversePage.svelte
index b43750fe46d680ae7600686fcb6e35ae15842bbc..fe65b643f70282a3224a483ca19a912c6c0c4afb 100644 (file)
       zoom: (search_params.get('zoom') > 1
         ? Number(search_params.get('zoom'))
         : Number(Nominatim_Config.Reverse_Default_Search_Zoom)),
+      layer: search_params.get('layer'),
       format: 'jsonv2'
     };
 
-    if (api_request_params.lat || api_request_params.lat) {
+    if (api_request_params.lat && api_request_params.lon) {
 
       fetch_from_api('reverse', api_request_params, function (data) {
+        position_marker = [api_request_params.lat, api_request_params.lon];
         if (data && !data.error) {
-          position_marker = [api_request_params.lat, api_request_params.lon];
           results_store.set([data]);
         } else {
           results_store.set([]);
 </script>
 
 <Header>
-  <SearchSectionReverse {...api_request_params} />
+  <SearchSectionReverse lat={api_request_params.lat}
+                        lon={api_request_params.lon}
+                        zoom={api_request_params.zoom}
+                        api_request_params={api_request_params} />
 </Header>
 
 <div id="content">