]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/reverse.php
clean up docs for lookup call
[nominatim.git] / website / reverse.php
index db783455432596dae17836105b9509f949efe268..a7261802a40d57aff23145f58cbd594d42e58eaf 100755 (executable)
@@ -23,10 +23,7 @@ $hLog = logStart($oDB, 'reverse', $_SERVER['QUERY_STRING'], $aLangPrefOrder);
 
 $oPlaceLookup = new Nominatim\PlaceLookup($oDB);
 $oPlaceLookup->loadParamArray($oParams);
-if ($sOutputFormat == 'geocodejson') {
-    $oPlaceLookup->setIncludeAddressDetails(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,14 +51,13 @@ if ($sOsmType && $iOsmId > 0) {
 }
 
 if (isset($aPlace)) {
-    $fRadius = $fDiameter = getResultDiameter($aPlace);
     $aOutlineResult = $oPlaceLookup->getOutlines(
         $aPlace['place_id'],
         $aPlace['lon'],
         $aPlace['lat'],
-        $fRadius, 
-        $fLat, 
-        $fLon 
+        Nominatim\ClassTypes\getProperty($aPlace, 'defdiameter', 0.0001),
+        $fLat,
+        $fLon
     );
 
     if ($aOutlineResult) {