X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/e678691b909996b245bdd17e7345467634703d6b..ff85679c2bc5fcc4119ab4da563fa5222440f3ab:/src/pages/DetailsPage.svelte?ds=inline

diff --git a/src/pages/DetailsPage.svelte b/src/pages/DetailsPage.svelte
index 500c5c3..9d72944 100644
--- a/src/pages/DetailsPage.svelte
+++ b/src/pages/DetailsPage.svelte
@@ -4,13 +4,14 @@
 
   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';
@@ -71,7 +72,7 @@
     <div class="row">
       <div class="col-sm-10">
         <h1>
-          {aPlace.localname}
+          {aPlace.localname || `${formatOSMType(aPlace.osm_type)} ${aPlace.osm_id}` }
           <small><DetailsLink feature={aPlace}>link to this page</DetailsLink></small>
         </h1>
       </div>
@@ -83,7 +84,13 @@
       <div class="col-md-6">
         <table id="locationdetails" class="table table-striped table-responsive">
           <tbody>
-            <InfoRow title="Name"><InfoRowList items={aPlace.names} /></InfoRow>
+            <InfoRow title="Name">
+            {#if (Array.isArray(aPlace.names)) }
+              <span class="noname font-weight-bold">No Name</span>
+            {:else}
+              <InfoRowList items={aPlace.names} />
+            {/if}
+            </InfoRow>
             <InfoRow title="Type">{aPlace.category}:{aPlace.type}</InfoRow>
             <InfoRow title="Last Updated">{aPlace.indexed_date}</InfoRow>
             {#if (isAdminBoundary(aPlace)) }
@@ -109,7 +116,12 @@
             {#if aPlace.calculated_wikipedia}
               <InfoRow title="Wikipedia Calculated">{@html wikipediaLink(aPlace)}</InfoRow>
             {/if}
-            <InfoRow title="Computed Postcode">{aPlace.calculated_postcode || ''}</InfoRow>
+            <InfoRow title="Computed Postcode">
+              {#if aPlace.calculated_postcode}
+                {aPlace.calculated_postcode}
+                <DetailsPostcodeHint postcode={aPlace.calculated_postcode} lat={aPlace.centroid.coordinates[1]} lon={aPlace.centroid.coordinates[0]} />
+              {/if}
+            </InfoRow>
             <InfoRow title="Address Tags"><InfoRowList items={aPlace.addresstags} /></InfoRow>
             <InfoRow title="Extra Tags"><InfoRowList items={aPlace.extratags} /></InfoRow>
           </tbody>
@@ -243,6 +255,9 @@
     border-top: none !important;
     padding-left: 0 !important;
   }
+  :global(span.noname){
+    color:#800;
+  }
 
   #map-wrapper {
     width:100%;
