]> git.openstreetmap.org Git - nominatim-ui.git/commitdiff
add advanced option -layer- to search.html
authormarc tobias <mtmail@gmx.net>
Sun, 3 Nov 2024 23:12:53 +0000 (00:12 +0100)
committermtmail <mtmail@gmx.net>
Mon, 4 Nov 2024 21:29:07 +0000 (22:29 +0100)
src/components/SearchSection.svelte
src/pages/SearchPage.svelte

index 70e8df66a650b558deeae49256c8d569d4801830..c1d3c18367a64e6f546c8f59327485d94d8196df 100644 (file)
                name="limit" value="{api_request_params.limit || ''}" />
         <input type="hidden"
                name="polygon_threshold" value="{api_request_params.polygon_threshold || ''}" />
+        <input type="hidden"
+               name="layer" value="{api_request_params.layer || ''}" />
       </div>
     </UrlSubmitForm>
   </div>
                name="limit" value="{api_request_params.limit || ''}" />
         <input type="hidden"
                name="polygon_threshold" value="{api_request_params.polygon_threshold || ''}" />
+        <input type="hidden"
+               name="layer" value="{api_request_params.layer || ''}" />
       </div>
     </UrlSubmitForm>
   </div>
              pattern="^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$"
              on:change={set_api_param}>
     </li>
+    <li>
+      <label for="option_layer">Layer</label>
+      <input id="option_layer" name="layer" placeholder="e.g. address,poi,railway,natural,manmade"
+        value="{api_request_params.layer || ''}"
+        data-api-param="layer" on:change={set_api_param}
+        class="form-control form-control-sm d-inline w-auto api-param-setting">
+    </li>
   </ul>
 </details>
 
index 24fe1d855bc1fd242c696f1074940b1ebf2a96c2..fd4e7c558abb2905f8400d47455da17ab3ce3eca 100644 (file)
@@ -28,6 +28,7 @@
       dedupe: (!search_params.has('dedupe') || search_params.get('dedupe') === '1') ? 1 : 0,
       'accept-language': search_params.get('accept-language'),
       countrycodes: search_params.get('countrycodes'),
+      layer: search_params.get('layer'),
       limit: search_params.get('limit'),
       polygon_threshold: search_params.get('polygon_threshold'),
       exclude_place_ids: search_params.get('exclude_place_ids'),