X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/57bf76a0e1d766bc90afcb8a748c5e25e7aa6f08..2be70b2c365ac5cdb15f0800463d19e72999cd92:/utils/warm.php?ds=sidebyside diff --git a/utils/warm.php b/utils/warm.php old mode 100755 new mode 100644 index 653bcf10..8ba746a2 --- a/utils/warm.php +++ b/utils/warm.php @@ -1,7 +1,5 @@ -#!@PHP_BIN@ -Cq connect(); $bVerbose = $aResult['verbose']; @@ -37,13 +36,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 '.';