X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b25ecf13db2481cc6be7745424ef54ab2de6a4cb..f822b04dbe7caf9794b4f206fd8b75ad0ceafd15:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index b2f85ca2..482e9598 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -169,7 +169,7 @@ { $aResult = array(array(join(' ',$aWords))); $sFirstToken = ''; - if ($iDepth < 8) { + if ($iDepth < 7) { while(sizeof($aWords) > 1) { $sWord = array_shift($aWords); @@ -246,7 +246,13 @@ if (sizeof($aNearPostcodes)) { - return array(array('lat' => $aNearPostcodes[0]['lat'], 'lon' => $aNearPostcodes[0]['lon'], 'radius' => 0.005)); + $aPostcodes = array(); + foreach($aNearPostcodes as $aPostcode) + { + $aPostcodes[] = array('lat' => $aPostcode['lat'], 'lon' => $aPostcode['lon'], 'radius' => 0.005); + } + + return $aPostcodes; } return false;