X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7a964efb3a104e304be7620dc18fa123559f05c8..0ae62280ab348e3fc779558a119f5f93ebd2583b:/website/reverse.php diff --git a/website/reverse.php b/website/reverse.php index 3c3824eb..5f9268c6 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -23,10 +23,7 @@ $hLog = logStart($oDB, 'reverse', $_SERVER['QUERY_STRING'], $aLangPrefOrder); $oPlaceLookup = new Nominatim\PlaceLookup($oDB); $oPlaceLookup->loadParamArray($oParams); -if ($sOutputFormat == 'geocodejson') { - $oPlaceLookup->setAddressDetails(true); - $oPlaceLookup->setAddressAdminLevels(true); -} +$oPlaceLookup->setIncludeAddressDetails($oParams->getBool('addressdetails', true)); $sOsmType = $oParams->getSet('osm_type', array('N', 'W', 'R')); $iOsmId = $oParams->getInt('osm_id', -1); @@ -54,12 +51,13 @@ if ($sOsmType && $iOsmId > 0) { } if (isset($aPlace)) { - $fRadius = $fDiameter = getResultDiameter($aPlace); $aOutlineResult = $oPlaceLookup->getOutlines( $aPlace['place_id'], $aPlace['lon'], $aPlace['lat'], - $fRadius + Nominatim\ClassTypes\getProperty($aPlace, 'defdiameter', 0.0001), + $fLat, + $fLon ); if ($aOutlineResult) { @@ -69,6 +67,7 @@ if (isset($aPlace)) { $aPlace = array(); } +logEnd($oDB, $hLog, sizeof($aPlace)?1:0); if (CONST_Debug) { var_dump($aPlace);