- if (isset($aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['label'])
- && $aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['label']
- ) {
- $aResult['label'] = $aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['label'];
- } elseif (isset($aClassType[$aResult['class'].':'.$aResult['type']]['label'])
- && $aClassType[$aResult['class'].':'.$aResult['type']]['label']
- ) {
- $aResult['label'] = $aClassType[$aResult['class'].':'.$aResult['type']]['label'];
- }
- // if tag '&addressdetails=1' is set in query
- if ($this->bIncludeAddressDetails) {
- // getAddressDetails() is defined in lib.php and uses the SQL function get_addressdata in functions.sql
- $aResult['address'] = getAddressDetails($this->oDB, $sLanguagePrefArraySQL, $aResult['place_id'], $aResult['country_code'], $aResults[$aResult['place_id']]->iHouseNumber);
- if ($aResult['extra_place'] == 'city' && !isset($aResult['address']['city'])) {
- $aResult['address'] = array_merge(array('city' => array_values($aResult['address'])[0]), $aResult['address']);
- }