X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8fd7d319b7ef6ee4d4f8cf3b61eb47903e7fb1eb..aade8c75cb6036c85f4df36c810fbbcc07f43907:/website/search.php diff --git a/website/search.php b/website/search.php index 8e0bb6f6..e85c3369 100755 --- a/website/search.php +++ b/website/search.php @@ -20,6 +20,13 @@ $aLangPrefOrder = getPreferredLanguages(); $oGeocode->setLanguagePreference($aLangPrefOrder); + /* + if (isset($aLangPrefOrder['name:de'])) $oGeocode->setReverseInPlan(true); + if (isset($aLangPrefOrder['name:ru'])) $oGeocode->setReverseInPlan(true); + if (isset($aLangPrefOrder['name:ja'])) $oGeocode->setReverseInPlan(true); + if (isset($aLangPrefOrder['name:pl'])) $oGeocode->setReverseInPlan(true); + */ + function loadParamsToGeocode($oGeocode, $aParams, $bBatch = false) { if (isset($aParams['addressdetails'])) $oGeocode->setIncludeAddressDetails((bool)$aParams['addressdetails']); @@ -29,6 +36,8 @@ if (isset($aParams['limit'])) $oGeocode->setLimit((int)$aParams['limit']); if (isset($aParams['offset'])) $oGeocode->setOffset((int)$aParams['offset']); + if (isset($aParams['fallback'])) $oGeocode->setFallback((int)$aParams['fallback']); + // List of excluded Place IDs - used for more acurate pageing if (isset($aParams['exclude_place_ids']) && $aParams['exclude_place_ids']) { @@ -107,6 +116,7 @@ if (!$sQuery) { $oGeocode->setStructuredQuery(@$aParams['amenity'], @$aParams['street'], @$aParams['city'], @$aParams['county'], @$aParams['state'], @$aParams['country'], @$aParams['postalcode']); + $oGeocode->setReverseInPlan(false); } else { @@ -160,7 +170,7 @@ loadParamsToGeocode($oGeocode, $_GET, false); - if (isset($_GET['batch'])) + if (CONST_Search_BatchMode && isset($_GET['batch'])) { $aBatch = json_decode($_GET['batch'], true); $aBatchResults = array();