2 import DetailsLink from '../components/DetailsLink.svelte';
3 import PageLink from '../components/PageLink.svelte';
5 formatPlaceType, osmLink, formatAdminLevel, formatDistance
6 } from '../lib/helpers.js';
8 export let addressLine;
9 export let bDistanceInMeters;
10 export let bMarkUnusedLines = false;
12 $: bAddressLineUsed = addressLine.isaddress;
13 $: reverse_only = Nominatim_Config.Reverse_Only;
16 <tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>
17 <td class="name fw-bold">
18 {#if addressLine.localname}
19 {addressLine.localname}
21 <span class="noname">No Name</span>
24 <td>{formatPlaceType(addressLine)}</td>
25 <td>{@html osmLink(addressLine)}</td>
26 <td>{addressLine.rank_address}</td>
27 <td>{formatAdminLevel(addressLine.admin_level)}</td>
28 <td>{@html formatDistance(addressLine.distance, bDistanceInMeters)}</td>
30 {#if addressLine.osm_id}
31 <DetailsLink feature={addressLine}>
34 {:else if !reverse_only && addressLine.type.match(/^country/)}
35 <PageLink page='search' params_hash={{ country: addressLine.localname }}>
38 {:else if !reverse_only && addressLine.type === 'postcode'}
39 <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>