mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
replace NearPoint with a more generic context object
The NearPoint is actually common to all SearchDescriptions and there is other context data as well. like viewbox, that needs to be available to the search object but is common.
This commit is contained in:
@@ -66,15 +66,22 @@ class ReverseGeocode
|
||||
);
|
||||
}
|
||||
|
||||
public function lookup($fLat, $fLon, $bDoInterpolation = true)
|
||||
{
|
||||
return $this->lookupPoint(
|
||||
'ST_SetSRID(ST_Point('.$fLon.','.$fLat.'),4326)',
|
||||
$bDoInterpolation
|
||||
);
|
||||
}
|
||||
|
||||
/* lookup()
|
||||
* returns { place_id =>, type => '(osm|tiger)' }
|
||||
* fails if no place was found
|
||||
*/
|
||||
|
||||
|
||||
public function lookup($fLat, $fLon, $bDoInterpolation = true)
|
||||
public function lookupPoint($sPointSQL, $bDoInterpolation = true)
|
||||
{
|
||||
$sPointSQL = 'ST_SetSRID(ST_Point('.$fLon.','.$fLat.'),4326)';
|
||||
$iMaxRank = $this->iMaxRank;
|
||||
|
||||
// Find the nearest point
|
||||
|
||||
Reference in New Issue
Block a user