function place_has_keywords(aThisPlace) {
// Return false if Nominatim API sends 'keywords: { name: [], address: [] }'
function place_has_keywords(aThisPlace) {
// Return false if Nominatim API sends 'keywords: { name: [], address: [] }'
return (
aThisPlace.keywords && aThisPlace.keywords.name && aThisPlace.keywords.address
&& (aThisPlace.keywords.name.length > 0 || aThisPlace.keywords.address.length > 0)
);
}
return (
aThisPlace.keywords && aThisPlace.keywords.name && aThisPlace.keywords.address
&& (aThisPlace.keywords.name.length > 0 || aThisPlace.keywords.address.length > 0)
);
}
<InfoRow title="Admin Level">{aPlace.admin_level}</InfoRow>
{/if}
<InfoRow title="Search Rank">{aPlace.rank_search}</InfoRow>
<InfoRow title="Admin Level">{aPlace.admin_level}</InfoRow>
{/if}
<InfoRow title="Search Rank">{aPlace.rank_search}</InfoRow>
{#if aPlace.calculated_importance}
<InfoRow title="Importance">
{aPlace.calculated_importance}
{#if aPlace.calculated_importance}
<InfoRow title="Importance">
{aPlace.calculated_importance}
<InfoRow title="Centre Point (lat,lon)">
{aPlace.centroid.coordinates[1]},{aPlace.centroid.coordinates[0]}
</InfoRow>
<InfoRow title="Centre Point (lat,lon)">
{aPlace.centroid.coordinates[1]},{aPlace.centroid.coordinates[0]}
</InfoRow>
<InfoRow title="Wikipedia Calculated">{@html wikipediaLink(aPlace)}</InfoRow>
{/if}
<InfoRow title="Computed Postcode">
{#if aPlace.calculated_postcode}
{aPlace.calculated_postcode}
<InfoRow title="Wikipedia Calculated">{@html wikipediaLink(aPlace)}</InfoRow>
{/if}
<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]} />
+ <DetailsPostcodeHint postcode={aPlace.calculated_postcode}
+ lat={aPlace.centroid.coordinates[1]}
+ lon={aPlace.centroid.coordinates[0]} />
- <DetailsOneRow addressLine={addressLine} bMarkUnusedLines={true} bDistanceInMeters={false} />
+ <DetailsOneRow addressLine={addressLine}
+ bMarkUnusedLines={true}
+ bDistanceInMeters={false}
+ sCountryCode={country_code(aPlace)} />
{/each}
{/if}
{#if aPlace.linked_places}
<tr class="all-columns"><td colspan="7"><h2>Linked Places</h2></td></tr>
{#each aPlace.linked_places as addressLine}
{/each}
{/if}
{#if aPlace.linked_places}
<tr class="all-columns"><td colspan="7"><h2>Linked Places</h2></td></tr>
{#each aPlace.linked_places as addressLine}
<tr class="all-columns"><td colspan="7"><h2>Parent Of</h2></td></tr>
{#if api_request_params.hierarchy}
<tr class="all-columns"><td colspan="7"><h2>Parent Of</h2></td></tr>
{#if api_request_params.hierarchy}
{#each Object.keys(aPlace.hierarchy) as type}
<tr class="all-columns"><td colspan="7"><h3>{type}</h3></td></tr>
{#each aPlace.hierarchy[type] as line}
{#each Object.keys(aPlace.hierarchy) as type}
<tr class="all-columns"><td colspan="7"><h3>{type}</h3></td></tr>
{#each aPlace.hierarchy[type] as line}