]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/components/SearchSection.svelte
add advanced option -layer- to search.html
[nominatim-ui.git] / src / components / SearchSection.svelte
index efffc0fda6569f3ead5b0c75e1e7583bef0eb043..c1d3c18367a64e6f546c8f59327485d94d8196df 100644 (file)
@@ -7,8 +7,9 @@
   export let bStructuredSearch = false;
   export let api_request_params = {};
   let sViewBox;
-  let lat;
-  let lon;
+  // lat,lon are later set in update_reverse_link()
+  let lat; // eslint-disable-line no-unused-vars
+  let lon; // eslint-disable-line no-unused-vars
 
   function map_viewbox_as_string(map) {
     var bounds = map.getBounds();
                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>