mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 05:18:00 +00:00
make PlaceLookup::lookup() accept multiple results
This commit is contained in:
@@ -59,7 +59,12 @@ if ($sOsmType && $iOsmId > 0) {
|
||||
$oLookup = $oReverseGeocode->lookup($fLat, $fLon);
|
||||
if (CONST_Debug) var_dump($oLookup);
|
||||
|
||||
$aPlace = $oPlaceLookup->lookup($oLookup);
|
||||
if ($oLookup) {
|
||||
$aPlaces = $oPlaceLookup->lookup(array($oLookup->iId => $oLookup));
|
||||
if (sizeof($aPlaces)) {
|
||||
$aPlace = reset($aPlaces);
|
||||
}
|
||||
}
|
||||
} elseif ($sOutputFormat != 'html') {
|
||||
userError("Need coordinates or OSM object to lookup.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user