X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/f2633dcc2939466943d2257439c12775fb712a11..ff85679c2bc5fcc4119ab4da563fa5222440f3ab:/src/pages/DetailsPage.svelte?ds=inline diff --git a/src/pages/DetailsPage.svelte b/src/pages/DetailsPage.svelte index bbf2bf5..9d72944 100644 --- a/src/pages/DetailsPage.svelte +++ b/src/pages/DetailsPage.svelte @@ -4,19 +4,20 @@ 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'; import SearchSectionDetails from '../components/SearchSectionDetails.svelte'; import DetailsOneRow from '../components/DetailsOneRow.svelte'; import DetailsLink from '../components/DetailsLink.svelte'; + import DetailsPostcodeHint from '../components/DetailsPostcodeHint.svelte'; import InfoRow from '../components/DetailsInfoRow.svelte'; import InfoRowList from '../components/DetailsInfoRowList.svelte'; import Map from '../components/Map.svelte'; let aPlace; - let base_url = window.location.search; + let base_url; let api_request_params; let api_request_finished = false; @@ -57,6 +58,7 @@ let pageinfo = $page; if (pageinfo.tab === 'details') { loaddata(pageinfo.params); + base_url = window.location.search; } } @@ -70,7 +72,7 @@

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

@@ -80,9 +82,15 @@
- +
- + + {#if (Array.isArray(aPlace.names)) } + No Name + {:else} + + {/if} + {aPlace.category}:{aPlace.type}{aPlace.indexed_date} {#if (isAdminBoundary(aPlace)) } @@ -108,7 +116,12 @@ {#if aPlace.calculated_wikipedia} {@html wikipediaLink(aPlace)} {/if} - {aPlace.calculated_postcode || ''} + + {#if aPlace.calculated_postcode} + {aPlace.calculated_postcode} + + {/if} + @@ -138,14 +151,14 @@ {#if aPlace.address} {#each aPlace.address as addressLine} - + {/each} {/if} {#if aPlace.linked_places} {#each aPlace.linked_places as addressLine} - + {/each} {/if} @@ -161,15 +174,17 @@ {/each} - - {#each aPlace.keywords.address as keyword} - - - {#if keyword.id} - - {/if} - - {/each} + {#if aPlace.keywords.address} + + {#each aPlace.keywords.address as keyword} + + + {#if keyword.id} + + {/if} + + {/each} + {/if} {:else}

Linked Places

Address Keywords

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

Address Keywords

{formatKeywordToken(keyword.token)}word id: {keyword.id}
@@ -240,10 +255,10 @@ border-top: none !important; padding-left: 0 !important; } - - .table { - width: 100%; + :global(span.noname){ + color:#800; } + #map-wrapper { width:100%; min-height: auto;