]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/ReverseGeocode.php
Parameterise the search only within countries
[nominatim.git] / lib-php / ReverseGeocode.php
index fddad60dca19d77b2f1433808b52189d007be34e..1777288afaff69937fcc2fcc4495f311a6b97583 100644 (file)
@@ -85,6 +85,11 @@ class ReverseGeocode
 
     protected function lookupLargeArea($sPointSQL, $iMaxRank)
     {
+        if(CONST_Search_WithinCountries
+            and $this->lookupInCountry($sPointSQL, $iMaxRank) == null){
+                return  null;
+        }
+
         if ($iMaxRank > 4) {
             $aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank);
             if ($aPlace) {