X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/dcd59f06164a299845230ad55c231e6a2fcd338e..2ba00544d30017ad30570011b1a2bcc6a8da73a7:/src/components/SearchSectionDetails.svelte?ds=sidebyside diff --git a/src/components/SearchSectionDetails.svelte b/src/components/SearchSectionDetails.svelte index 938b48b..5ca614a 100644 --- a/src/components/SearchSectionDetails.svelte +++ b/src/components/SearchSectionDetails.svelte @@ -6,8 +6,8 @@ function handleFormSubmit(event) { let form_el = event.target; let val = form_el.querySelector('input[type=edit]').value.trim(); - let type_and_id_match = val.match(/^\s*([NWR])(\d+)\s*$/i) - || val.match(/\/(relation|way|node)\/(\d+)\s*$/); + let type_and_id_match = val.match(/^\s*([NWR])(-?\d+)\s*$/i) + || val.match(/\/(relation|way|node)\/(-?\d+)\s*$/); var params = new URLSearchParams(); if (type_and_id_match) { @@ -25,22 +25,38 @@
- - +
+
+ + +
+
+ +
+
- OSM type+id (N123, W123, R123), + OSM type+id (N123, + n123, + W123, + w123, + R123, + r123), Place id (1234) or URL (https://openstreetmap.org/way/123)