X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/d092630e94af1e5c38c8cb22335b939f6759ab7d..5bbe331d6aff4d3aeca2006fa3d0d8dafe8be674:/src/pages/DetailsPage.svelte?ds=sidebyside

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 @@
     <div class="row">
       <div class="col-md-12">
         <h2>Address</h2>
-         <table id="address" class="table table-striped table-small">
+        <table id="address" class="table table-striped table-small">
           <thead>
             <tr>
               <th>Local name</th>
@@ -172,7 +177,8 @@
               {#each aPlace.address as addressLine}
                 <DetailsOneRow addressLine={addressLine}
                                bMarkUnusedLines={true}
-                               bDistanceInMeters={false} />
+                               bDistanceInMeters={false}
+                               sCountryCode={country_code(aPlace)} />
               {/each}
             {/if}
 
