]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/components/DetailsOneRow.svelte
reverse search: better initial zoom (#63)
[nominatim-ui.git] / src / components / DetailsOneRow.svelte
1 <script>
2
3   export let addressLine;
4   export let bDistanceInMeters;
5
6   $: bAddressLineUsed = addressLine.isaddress;
7
8   import {
9     formatPlaceType, osmLink, formatAdminLevel, formatDistance, detailsURL
10   } from '../lib/helpers.js';
11
12 </script>
13
14 <tr class:notused={!bAddressLineUsed}>
15   <td class="name">
16     {#if addressLine.localname}
17       {addressLine.localname}
18     {:else}
19       <span class="noname">No Name</span>
20     {/if}
21   </td>
22   <td>{formatPlaceType(addressLine)}</td>
23   <td>{@html osmLink(addressLine)}</td>
24   <td>{addressLine.rank_address}</td>
25   <td>{formatAdminLevel(addressLine.admin_level)}</td>
26   <td>{@html formatDistance(addressLine.distance, bDistanceInMeters)}</td>
27   <td>{#if addressLine.osm_id}<a href="{detailsURL(addressLine)}">details</a>{/if}</td>
28 </tr>
29
30 <style>
31   .notused {
32     color:#ddd;
33   }
34   .name{
35     font-weight: bold;
36   }
37   .noname{
38     color:#800;
39   }
40 </style>