X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/cdd129de702dda5608a07ea81b4ffa8ddaeb477a..1ccf4fb92fe71e9e2bc0baabfb2e92cd79166dae:/website/search.php?ds=sidebyside diff --git a/website/search.php b/website/search.php index f1ddbbe5..29c87320 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']); @@ -107,6 +114,7 @@ if (!$sQuery) { $oGeocode->setStructuredQuery(@$aParams['amenity'], @$aParams['street'], @$aParams['city'], @$aParams['county'], @$aParams['state'], @$aParams['country'], @$aParams['postalcode']); + $oGeocode->setReverseInPlan(false); } else { @@ -151,7 +159,7 @@ } exit; } - $oGeocode->setIncludePolygonAsText($bAsPoints); + $oGeocode->setIncludePolygonAsPoints($bAsPoints); $oGeocode->setIncludePolygonAsText($bAsText); $oGeocode->setIncludePolygonAsGeoJSON($bAsGeoJSON); $oGeocode->setIncludePolygonAsKML($bAsKML); @@ -160,7 +168,7 @@ loadParamsToGeocode($oGeocode, $_GET, false); - if (isset($_GET['batch'])) + if (CONST_Search_BatchMode && isset($_GET['batch'])) { $aBatch = json_decode($_GET['batch'], true); $aBatchResults = array(); @@ -187,7 +195,7 @@ $bAsText = $oGeocode->getIncludePolygonAsText(); $sQuery = $oGeocode->getQueryString(); $sViewBox = $oGeocode->getViewBoxString(); - $bShowPolygons = (isset($_GET['polygon']) && isset($_GET['polygon'])); + $bShowPolygons = (isset($_GET['polygon']) && $_GET['polygon']); $aExcludePlaceIDs = $oGeocode->getExcludedPlaceIDs(); $sMoreURL = CONST_Website_BaseURL.'search?format='.urlencode($sOutputFormat).'&exclude_place_ids='.join(',',$oGeocode->getExcludedPlaceIDs());