X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/e52ee350618d8cbbe2ab147bfb2cef6507d6e12e..5f19b23f49aee9989267ac03b488049f9d681166:/lib/template/search-json.php diff --git a/lib/template/search-json.php b/lib/template/search-json.php index 30817c04..6108aca4 100644 --- a/lib/template/search-json.php +++ b/lib/template/search-json.php @@ -44,8 +44,8 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) { $aPlace['icon'] = $aPointDetails['icon']; } - if (isset($aPointDetails['address']) && !empty($aPointDetails['address'])) { - $aPlace['address'] = $aPointDetails['address']; + if (isset($aPointDetails['address'])) { + $aPlace['address'] = $aPointDetails['address']->getAddressNames(); } if (isset($aPointDetails['asgeojson'])) {