X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6a337f13d03ce4bcb76cb9b2908b02e0f524c16f..1f2ee8ed77695c2e475508f961db5b37f8d83bd6:/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();