From: Marc Tobias Metten Date: Thu, 22 Dec 2016 01:06:08 +0000 (+0100) Subject: sMoreURL now includes countrycodes values X-Git-Tag: v3.0.0~84^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/adb6ea546ff420a9b68deed77edd5e900c93833a?ds=sidebyside sMoreURL now includes countrycodes values --- diff --git a/lib/Geocode.php b/lib/Geocode.php index 03df6752..4809575d 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -126,6 +126,12 @@ class Geocode return $this->aExcludePlaceIDs; } + + public function getCountryCodes() + { + return $this->aCountryCodes; + } + public function getViewBoxString() { if (!$this->aViewBox) return null; diff --git a/website/search.php b/website/search.php index c1169c8a..5beb659d 100755 --- a/website/search.php +++ b/website/search.php @@ -110,6 +110,7 @@ if ($bShowPolygons) $sMoreURL .= '&polygon=1'; if ($oGeocode->getIncludeAddressDetails()) $sMoreURL .= '&addressdetails=1'; if ($oGeocode->getIncludeExtraTags()) $sMoreURL .= '&extratags=1'; if ($oGeocode->getIncludeNameDetails()) $sMoreURL .= '&namedetails=1'; +if ($oGeocode->getCountryCodes()) $sMoreURL .= '&countrycodes='.join(',', $oGeocode->getCountryCodes()); if ($sViewBox) $sMoreURL .= '&viewbox='.urlencode($sViewBox); if (isset($_GET['nearlat']) && isset($_GET['nearlon'])) $sMoreURL .= '&nearlat='.(float)$_GET['nearlat'].'&nearlon='.(float)$_GET['nearlon']; $sMoreURL .= '&q='.urlencode($sQuery);