X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/9e8d3367fe08a708b1019ff39ac752e0105be20a..2ba00544d30017ad30570011b1a2bcc6a8da73a7:/src/components/DetailsLink.svelte?ds=inline
diff --git a/src/components/DetailsLink.svelte b/src/components/DetailsLink.svelte
index fbeb4f1..1785179 100644
--- a/src/components/DetailsLink.svelte
+++ b/src/components/DetailsLink.svelte
@@ -21,22 +21,25 @@
$: {
let new_params = new URLSearchParams();
- if (feature !== null && feature.osm_type) {
- if (feature.osm_type.length === 1) {
- new_params.set('osmtype', feature.osm_type);
- } else {
- new_params.set('osmtype', formatShortOSMType(feature.osm_type));
- }
-
- new_params.set('osmid', feature.osm_id);
-
- if (feature.class) {
- new_params.set('class', feature.class);
- } else if (feature.category) {
- new_params.set('class', feature.category);
+ if (feature !== null) {
+ if (feature.osm_type) {
+ if (feature.osm_type.length === 1) {
+ new_params.set('osmtype', feature.osm_type);
+ } else {
+ new_params.set('osmtype', formatShortOSMType(feature.osm_type));
+ }
+
+ new_params.set('osmid', feature.osm_id);
+
+ if (feature.class) {
+ new_params.set('class', feature.class);
+ } else if (feature.category) {
+ new_params.set('class', feature.category);
+ }
+ } else if (feature.place_id) {
+ new_params.set('place_id', feature.place_id);
}
}
-
url_params = new_params;
}
@@ -46,4 +49,6 @@
}
-
+