sMoreURL now includes countrycodes values

This commit is contained in:
Marc Tobias Metten 2016-12-22 02:06:08 +01:00
parent 3ff8bb55a7
commit adb6ea546f
2 changed files with 7 additions and 0 deletions

View File

@ -126,6 +126,12 @@ class Geocode
return $this->aExcludePlaceIDs; return $this->aExcludePlaceIDs;
} }
public function getCountryCodes()
{
return $this->aCountryCodes;
}
public function getViewBoxString() public function getViewBoxString()
{ {
if (!$this->aViewBox) return null; if (!$this->aViewBox) return null;

View File

@ -110,6 +110,7 @@ if ($bShowPolygons) $sMoreURL .= '&polygon=1';
if ($oGeocode->getIncludeAddressDetails()) $sMoreURL .= '&addressdetails=1'; if ($oGeocode->getIncludeAddressDetails()) $sMoreURL .= '&addressdetails=1';
if ($oGeocode->getIncludeExtraTags()) $sMoreURL .= '&extratags=1'; if ($oGeocode->getIncludeExtraTags()) $sMoreURL .= '&extratags=1';
if ($oGeocode->getIncludeNameDetails()) $sMoreURL .= '&namedetails=1'; if ($oGeocode->getIncludeNameDetails()) $sMoreURL .= '&namedetails=1';
if ($oGeocode->getCountryCodes()) $sMoreURL .= '&countrycodes='.join(',', $oGeocode->getCountryCodes());
if ($sViewBox) $sMoreURL .= '&viewbox='.urlencode($sViewBox); if ($sViewBox) $sMoreURL .= '&viewbox='.urlencode($sViewBox);
if (isset($_GET['nearlat']) && isset($_GET['nearlon'])) $sMoreURL .= '&nearlat='.(float)$_GET['nearlat'].'&nearlon='.(float)$_GET['nearlon']; if (isset($_GET['nearlat']) && isset($_GET['nearlon'])) $sMoreURL .= '&nearlat='.(float)$_GET['nearlat'].'&nearlon='.(float)$_GET['nearlon'];
$sMoreURL .= '&q='.urlencode($sQuery); $sMoreURL .= '&q='.urlencode($sQuery);