From adb6ea546ff420a9b68deed77edd5e900c93833a Mon Sep 17 00:00:00 2001 From: Marc Tobias Metten Date: Thu, 22 Dec 2016 02:06:08 +0100 Subject: [PATCH] sMoreURL now includes countrycodes values --- lib/Geocode.php | 6 ++++++ website/search.php | 1 + 2 files changed, 7 insertions(+) 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); -- 2.45.1