X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/320d488627b1a5674458cbef644c6731882b2a23..abd294912abf844d054d5786dd80b7f1a2170a4d:/website/reverse.php diff --git a/website/reverse.php b/website/reverse.php old mode 100755 new mode 100644 index 2e03acae..6864d65e --- a/website/reverse.php +++ b/website/reverse.php @@ -1,7 +1,5 @@ getSet('format', array('html', 'xml', 'json', 'jsonv2', 'geojson', 'geocodejson'), 'xml'); +set_exception_handler_by_format($sOutputFormat); // Preferred language $aLangPrefOrder = $oParams->getPreferredLanguages(); @@ -23,10 +22,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); @@ -70,6 +66,7 @@ if (isset($aPlace)) { $aPlace = array(); } +logEnd($oDB, $hLog, sizeof($aPlace)?1:0); if (CONST_Debug) { var_dump($aPlace);