From f0e5cf53b80a2649d750cb963deb237a58b65029 Mon Sep 17 00:00:00 2001 From: gemo1011 Date: Wed, 23 May 2018 15:29:41 +0200 Subject: [PATCH] only starts the search in country_osm_grid if $iMaxRank > 4 --- lib/ReverseGeocode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']); -- 2.39.5