X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/d092630e94af1e5c38c8cb22335b939f6759ab7d..5bbe331d6aff4d3aeca2006fa3d0d8dafe8be674:/src/pages/DetailsPage.svelte diff --git a/src/pages/DetailsPage.svelte b/src/pages/DetailsPage.svelte index 225d1a0..aa3670f 100644 --- a/src/pages/DetailsPage.svelte +++ b/src/pages/DetailsPage.svelte @@ -63,6 +63,11 @@ ); } + function country_code(aThisPlace) { + let aLine = aThisPlace.address.find((address_line) => address_line.type === 'country_code'); + return aLine ? aLine.localname : null; + } + $: { let pageinfo = $page; if (pageinfo.tab === 'details') { @@ -155,7 +160,7 @@

Address

- +
@@ -172,7 +177,8 @@ {#each aPlace.address as addressLine} + bDistanceInMeters={false} + sCountryCode={country_code(aPlace)} /> {/each} {/if}
Local name