X-Git-Url: https://git.openstreetmap.org/nominatim-ui.git/blobdiff_plain/9bd6e72026d6b978ed3f5004be73fd253ef82318..3e7d875df78b94d17251d811f891761dc8b67735:/src/pages/DetailsPage.svelte diff --git a/src/pages/DetailsPage.svelte b/src/pages/DetailsPage.svelte index 34a7f63..eef7f23 100644 --- a/src/pages/DetailsPage.svelte +++ b/src/pages/DetailsPage.svelte @@ -4,7 +4,7 @@ import { osmLink, wikipediaLink, coverageType, isAdminBoundary, - formatAddressRank, formatKeywordToken + formatAddressRank, formatKeywordToken, formatOSMType } from '../lib/helpers.js'; import Header from '../components/Header.svelte'; import MapIcon from '../components/MapIcon.svelte'; @@ -72,7 +72,7 @@

- {aPlace.localname} + {aPlace.localname || `${formatOSMType(aPlace.osm_type)} ${aPlace.osm_id}` } link to this page

@@ -84,7 +84,13 @@
- + + {#if (Array.isArray(aPlace.names)) } + No Name + {:else} + + {/if} + {aPlace.category}:{aPlace.type}{aPlace.indexed_date} {#if (isAdminBoundary(aPlace)) } @@ -157,20 +163,11 @@ {/if} - {#if aPlace.keywords} - - {#each aPlace.keywords.name as keyword} - - - {#if keyword.id} - - {/if} - - {/each} + {#if api_request_params.keywords} - {#if aPlace.keywords.address} - - {#each aPlace.keywords.address as keyword} + {#if aPlace.keywords && (aPlace.keywords.name || aPlace.keywords.address) } + + {#each aPlace.keywords.name as keyword} {#if keyword.id} @@ -178,6 +175,20 @@ {/if} {/each} + + {#if aPlace.keywords.address} + + {#each aPlace.keywords.address as keyword} + + + {#if keyword.id} + + {/if} + + {/each} + {/if} + {:else} + {/if} {:else} @@ -189,17 +200,21 @@ {/if} - {#if aPlace.hierarchy} + {#if api_request_params.hierarchy} + {#if aPlace.hierarchy && aPlace.hierarchy.length} - {#each Object.keys(aPlace.hierarchy) as type} - - {#each aPlace.hierarchy[type] as line} - - {/each} - {/each} + {#each Object.keys(aPlace.hierarchy) as 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} +
{/if} {:else} @@ -249,6 +264,9 @@ border-top: none !important; padding-left: 0 !important; } + :global(span.noname){ + color:#800; + } #map-wrapper { width:100%;

Keywords

Name Keywords

{formatKeywordToken(keyword.token)}word id: {keyword.id}

Address Keywords

Name Keywords

{formatKeywordToken(keyword.token)}

Address Keywords

{formatKeywordToken(keyword.token)}word id: {keyword.id}
Place has no keywords

Parent Of

{type}

{type}

Place is not parent of other places