From: Sarah Hoffmann Date: Fri, 6 Jul 2018 19:59:17 +0000 (+0200) Subject: ignore admin_level = 15 in geocodejson output X-Git-Tag: v3.2.0~52 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/05bef92f0f566b0a40e6efc63237028417572af2 ignore admin_level = 15 in geocodejson output Level 15 is an artifical value. --- 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']; } }