X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7585d378181184f973454020ad07b1b973c243ed..f0e5cf53b80a2649d750cb963deb237a58b65029:/lib/ReverseGeocode.php diff --git a/lib/ReverseGeocode.php b/lib/ReverseGeocode.php index 42215931..0c0a394e 100644 --- a/lib/ReverseGeocode.php +++ b/lib/ReverseGeocode.php @@ -266,7 +266,7 @@ class ReverseGeocode $aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank); if ($aPlace) { $oResult = new Result($aPlace['place_id']); - } else { + } elseif(!$aPlace && $iMaxRank > 4) { $aPlace = $this->noPolygonFound($sPointSQL, $iMaxRank); if ($aPlace) { $oResult = new Result($aPlace['place_id']); @@ -278,7 +278,7 @@ class ReverseGeocode $aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank); if ($aPlace) { $oResult = new Result($aPlace['place_id']); - } else { + } elseif(!$aPlace && $iMaxRank > 4) { $aPlace = $this->noPolygonFound($sPointSQL, $iMaxRank); if ($aPlace) { $oResult = new Result($aPlace['place_id']);