X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ec2d491dc8939ecf28ab84e26955bc7189618096..7ac22e92279fc77db316623c76cfcf6cbb22e070:/website/hierarchy.php?place_id=%27.%24aAddressLine%5B%27place_id%27%5D.%27
diff --git a/website/hierarchy.php b/website/hierarchy.php
index b31b85d1..66699f55 100644
--- a/website/hierarchy.php
+++ b/website/hierarchy.php
@@ -58,7 +58,7 @@ if (CONST_Use_Aux_Location_data) {
}
-$oAddressLookup = new AddressDetails($oDB, $iPlaceID, -1, $aLangPrefOrder);
+$oAddressLookup = new Nominatim\AddressDetails($oDB, $iPlaceID, -1, $aLangPrefOrder);
$aPlaceAddress = array_reverse($oAddressLookup->getAddressDetails());
if (empty($aPlaceAddress)) userError('Unknown place id.');
@@ -103,10 +103,8 @@ if (!empty($aParentOfLines)) {
echo '
Parent Of:
';
$aGroupedAddressLines = array();
foreach ($aParentOfLines as $aAddressLine) {
- $aAddressLine['label'] = Nominatim\ClassTypes\getProperty($aAddressLine, 'label');
- if (!$aAddressLine['label']) {
- $aAddressLine['label'] = ucwords($aAddressLine['type']);
- }
+ $aAddressLine['label'] = Nominatim\ClassTypes\getLabel($aAddressLine)
+ ?? ucwords($aAddressLine['type']);
if (!isset($aGroupedAddressLines[$aAddressLine['label']])) $aGroupedAddressLines[$aAddressLine['label']] = array();
$aGroupedAddressLines[$aAddressLine['label']][] = $aAddressLine;
@@ -121,7 +119,7 @@ if (!empty($aParentOfLines)) {
echo '';
echo '
'.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'No Name').'';
echo ' (';
- echo '
'.($aAddressLine['isarea']=='t'?'Polygon':'Point').'';
+ echo '
'.($aAddressLine['isarea']?'Polygon':'Point').'';
if ($sOSMType) echo ',
'.$sOSMType.' '.osmLink($aAddressLine).'';
echo ',
GOTO';
echo ', '.$aAddressLine['area'];