]> git.openstreetmap.org Git - nominatim.git/commitdiff
sMoreURL now includes countrycodes values
authorMarc Tobias Metten <mtmail@gmx.net>
Thu, 22 Dec 2016 01:06:08 +0000 (02:06 +0100)
committerMarc Tobias Metten <mtmail@gmx.net>
Thu, 22 Dec 2016 01:06:08 +0000 (02:06 +0100)
lib/Geocode.php
website/search.php

index 03df675278b5b21d43780a7e905355780c592e43..4809575dba7dfc8b2f14ff543432c4651d654593 100644 (file)
@@ -126,6 +126,12 @@ class Geocode
         return $this->aExcludePlaceIDs;
     }
 
+
+    public function getCountryCodes()
+    {
+        return $this->aCountryCodes;
+    }
+
     public function getViewBoxString()
     {
         if (!$this->aViewBox) return null;
index c1169c8ae6d78c864f5109091e5ab2d5f27e1acb..5beb659d510ff7ee7e03e3ed54730750fea89f3f 100755 (executable)
@@ -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);