]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
use Result class in reverse geocoding
[nominatim.git] / lib / Geocode.php
index 7c43aec006e966a61e7cddf3b0822d0a9422c0b0..09c1ccb4589742e29a4252a88f4151230c26820e 100644 (file)
@@ -1197,12 +1197,12 @@ class Geocode
             $oReverse = new ReverseGeocode($this->oDB);
             $oReverse->setZoom(18);
 
-            $aLookup = $oReverse->lookupPoint($oCtx->sqlNear, false);
+            $oLookup = $oReverse->lookupPoint($oCtx->sqlNear, false);
 
             if (CONST_Debug) var_dump("Reverse search", $aLookup);
 
-            if ($aLookup['place_id']) {
-                $aResults = array($aLookup['place_id'] => new Result($aLookup['place_id']));
+            if ($oLookup) {
+                $aResults = array($oLookup->iId => $oLookup);
                 $aSearchResults = $this->getDetails($aResults, $oCtx);
             } else {
                 $aSearchResults = array();