X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ec4e3c36af238ae3c31a2f5eb727fe2a22f6d054..69f30e8e193b5be4b7fc6b504641e6d17fe1827b:/utils/warm.php diff --git a/utils/warm.php b/utils/warm.php index 5e1b3eed..96372aec 100644 --- a/utils/warm.php +++ b/utils/warm.php @@ -35,13 +35,9 @@ if (!$aResult['search-only']) { $fLat = rand(-9000, 9000) / 100; $fLon = rand(-18000, 18000) / 100; if ($bVerbose) echo "$fLat, $fLon = "; - $aLookup = $oReverseGeocode->lookup($fLat, $fLon); - if ($aLookup && $aLookup['place_id']) { - $aDetails = $oPlaceLookup->lookup( - (int)$aLookup['place_id'], - $aLookup['type'], - $aLookup['fraction'] - ); + $oLookup = $oReverseGeocode->lookup($fLat, $fLon); + if ($oLookup) { + $aDetails = $oPlaceLookup->lookup(array($oLookup->iId => $oLookup)); if ($bVerbose) echo $aDetails['langaddress']."\n"; } else { echo '.';