X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/f5a4f0a5e1d87a05014292b91f416c2e6e7827e3..3e7d875df78b94d17251d811f891761dc8b67735:/src/pages/DetailsPage.svelte?ds=sidebyside
diff --git a/src/pages/DetailsPage.svelte b/src/pages/DetailsPage.svelte
index 9d72944..eef7f23 100644
--- a/src/pages/DetailsPage.svelte
+++ b/src/pages/DetailsPage.svelte
@@ -163,20 +163,11 @@
{/if}
Keywords |
- {#if aPlace.keywords}
- Name Keywords |
- {#each aPlace.keywords.name as keyword}
-
- {formatKeywordToken(keyword.token)} |
- {#if keyword.id}
- word id: {keyword.id} |
- {/if}
-
- {/each}
+ {#if api_request_params.keywords}
- {#if aPlace.keywords.address}
- Address Keywords |
- {#each aPlace.keywords.address as keyword}
+ {#if aPlace.keywords && (aPlace.keywords.name || aPlace.keywords.address) }
+ Name Keywords |
+ {#each aPlace.keywords.name as keyword}
{formatKeywordToken(keyword.token)} |
{#if keyword.id}
@@ -184,6 +175,20 @@
{/if}
{/each}
+
+ {#if aPlace.keywords.address}
+ Address Keywords |
+ {#each aPlace.keywords.address as keyword}
+
+ {formatKeywordToken(keyword.token)} |
+ {#if keyword.id}
+ word id: {keyword.id} |
+ {/if}
+
+ {/each}
+ {/if}
+ {:else}
+ Place has no keywords |
{/if}
{:else}
@@ -195,17 +200,21 @@
{/if}
Parent Of |
- {#if aPlace.hierarchy}
+ {#if api_request_params.hierarchy}
+ {#if aPlace.hierarchy && aPlace.hierarchy.length}
- {#each Object.keys(aPlace.hierarchy) as type}
- {type} |
- {#each aPlace.hierarchy[type] as line}
-
- {/each}
- {/each}
+ {#each Object.keys(aPlace.hierarchy) as type}
+ {type} |
+ {#each aPlace.hierarchy[type] as line}
+
+ {/each}
+ {/each}
- {#if Object.keys(aPlace.hierarchy) > 500}
- There are more child objects which are not shown.
+ {#if Object.keys(aPlace.hierarchy) > 500}
+ There are more child objects which are not shown.
+ {/if}
+ {:else}
+ Place is not parent of other places |
{/if}
{:else}