X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/01d5ecb86b10e950a087173faa666fe662e90ab0..05bef92f0f566b0a40e6efc63237028417572af2:/lib/PlaceLookup.php diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index f0db09c9..c94121f8 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -546,13 +546,15 @@ class PlaceLookup { $aAddressLines = $this->getAddressDetails( $iPlaceID, - false, + true, $sHousenumber === null ? -1 : $sHousenumber ); $aAddress = array(); foreach ($aAddressLines as $aLine) { - if (isset($aLine['admin_level'])) { + if (isset($aLine['admin_level']) + && $aLine['admin_level'] < 15 + && !isset($aAddress['level'.$aLine['admin_level']])) { $aAddress['level'.$aLine['admin_level']] = $aLine['localname']; } }