}
-$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;