X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2a784fa3d4533d11e3227f868085dcee5a9870c6..91395fb9ab8e5ce969c9cd894454948423b9c0fe:/website/reverse.php diff --git a/website/reverse.php b/website/reverse.php index 6d6490f8..56b80a5c 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -9,7 +9,7 @@ require_once(CONST_BasePath.'/lib/ReverseGeocode.php'); require_once(CONST_BasePath.'/lib/output.php'); ini_set('memory_limit', '200M'); -$oParams = new ParameterParser(); +$oParams = new Nominatim\ParameterParser(); $bAsGeoJSON = $oParams->getBool('polygon_geojson'); $bAsKML = $oParams->getBool('polygon_kml'); @@ -39,7 +39,7 @@ $oDB =& getDB(); $hLog = logStart($oDB, 'reverse', $_SERVER['QUERY_STRING'], $aLangPrefOrder); -$oPlaceLookup = new PlaceLookup($oDB); +$oPlaceLookup = new Nominatim\PlaceLookup($oDB); $oPlaceLookup->setLanguagePreference($aLangPrefOrder); $oPlaceLookup->setIncludeAddressDetails($oParams->getBool('addressdetails', true)); $oPlaceLookup->setIncludeExtraTags($oParams->getBool('extratags', false)); @@ -52,7 +52,7 @@ $fLon = $oParams->getFloat('lon'); if ($sOsmType && $iOsmId > 0) { $aPlace = $oPlaceLookup->lookupOSMID($sOsmType, $iOsmId); } elseif ($fLat !== false && $fLon !== false) { - $oReverseGeocode = new ReverseGeocode($oDB); + $oReverseGeocode = new Nominatim\ReverseGeocode($oDB); $oReverseGeocode->setZoom($oParams->getInt('zoom', 18)); $aLookup = $oReverseGeocode->lookup($fLat, $fLon); @@ -88,6 +88,7 @@ if ($aPlace) { } } +logEnd($oDB, $hLog, sizeof($aPlace)?1:0); if (CONST_Debug) { var_dump($aPlace);