Skip to content

Commit

Permalink
sMoreURL now includes countrycodes values
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmail committed Dec 22, 2016
1 parent 3ff8bb5 commit adb6ea5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Geocode.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ public function getExcludedPlaceIDs()
return $this->aExcludePlaceIDs;
}


public function getCountryCodes()
{
return $this->aCountryCodes;
}

public function getViewBoxString()
{
if (!$this->aViewBox) return null;
Expand Down
1 change: 1 addition & 0 deletions website/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
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);
Expand Down

0 comments on commit adb6ea5

Please sign in to comment.