}
-$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.');
echo '<h2>Parent Of:</h2>';
$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;
echo '<div class="line">';
echo '<span class="name">'.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'<span class="noname">No Name</span>').'</span>';
echo ' (';
- echo '<span class="area">'.($aAddressLine['isarea']=='t'?'Polygon':'Point').'</span>';
+ echo '<span class="area">'.($aAddressLine['isarea']?'Polygon':'Point').'</span>';
if ($sOSMType) echo ', <span class="osm"><span class="label"></span>'.$sOSMType.' '.osmLink($aAddressLine).'</span>';
echo ', <a href="hierarchy.php?place_id='.$aAddressLine['place_id'].'">GOTO</a>';
echo ', '.$aAddressLine['area'];