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']);