]> git.openstreetmap.org Git - nominatim.git/commitdiff
adapt warm.php to new Result objects
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 8 Jan 2019 21:45:21 +0000 (22:45 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 8 Jan 2019 21:45:21 +0000 (22:45 +0100)
Fixes #1276.

utils/warm.php

index 5e1b3eed98129711abe7b64225f9456b68e882ba..96372aec47e980e5a3ce107f5679811c689dee63 100644 (file)
@@ -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 '.';