mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 05:18:00 +00:00
use Result class in reverse geocoding
Also simplifies the reverse algorithm slightly by no longer having an additional distance lookup.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user