]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/reverse.php
calculate search position based to 'importance' rather than address rank
[nominatim.git] / website / reverse.php
index 116cddd18ace08798f5b10af39a92baca0333be3..b0205d2249771b28befcbdfbf1252b39d004157f 100755 (executable)
                 $sOutputFormat = $_GET['format'];
         }
 
+       // Show address breakdown
+       $bShowAddressDetails = true;
+       if (isset($_GET['addressdetails'])) $bShowAddressDetails = (bool)$_GET['addressdetails'];
+
         // Prefered language
         $aLangPrefOrder = getPrefferedLangauges();
         $sLanguagePrefArraySQL = "ARRAY[".join(',',array_map("getDBQuoted",$aLangPrefOrder))."]";
                $sSQL .= " from placex where place_id = $iPlaceID ";
                $aPlace = $oDB->getRow($sSQL);
 
-               $aAddress = getAddressDetails($oDB, $sLanguagePrefArraySQL, $iPlaceID, $aPlace['country_code']);
+               if ($bShowAddressDetails)
+               {
+                       $aAddress = getAddressDetails($oDB, $sLanguagePrefArraySQL, $iPlaceID, $aPlace['country_code']);
+               }
 
                $aClassType = getClassTypes();
                 $sAddressType = '';