add extratags and name details to PlaceLookup (reverse)

This commit is contained in:
Sarah Hoffmann
2015-08-09 15:14:59 +02:00
parent 5581bb67f8
commit 86ca377b1a
7 changed files with 146 additions and 56 deletions

View File

@@ -9,8 +9,6 @@
protected $aLangPrefOrder = array();
protected $bShowAddressDetails = true;
function ReverseGeocode(&$oDB)
{
$this->oDB =& $oDB;
@@ -21,11 +19,6 @@
$this->aLangPrefOrder = $aLangPref;
}
function setIncludeAddressDetails($bAddressDetails = true)
{
$this->bAddressDetails = $bAddressDetails;
}
function setLatLon($fLat, $fLon)
{
$this->fLat = (float)$fLat;
@@ -171,13 +164,8 @@
}
}
$oPlaceLookup = new PlaceLookup($this->oDB);
$oPlaceLookup->setLanguagePreference($this->aLangPrefOrder);
$oPlaceLookup->setIncludeAddressDetails($this->bAddressDetails);
$oPlaceLookup->setPlaceId($iPlaceID);
$oPlaceLookup->setIsTiger($bPlaceIsTiger);
return $oPlaceLookup->lookup();
return array('place_id' => $iPlaceID,
'type' => $bPlaceIsTiger ? 'tiger' : 'osm');
}
}
?>