$aFilteredPlaces = array();
if (empty($aPlace)) {
- if (isset($sError))
+ if (isset($sError)) {
$aFilteredPlaces['error'] = $sError;
- else $aFilteredPlaces['error'] = 'Unable to geocode';
+ } else {
+ $aFilteredPlaces['error'] = 'Unable to geocode';
+ }
javascript_renderData($aFilteredPlaces);
} else {
$aFilteredPlaces = array(
if (isset($aPlace['address'])) {
$aFilteredPlaces['properties']['address'] = $aPlace['address']->getAddressNames();
}
- if (isset($aPlace['sExtraTags'])) $aFilteredPlaces['properties']['extratags'] = $aPlace['sExtraTags'];
- if (isset($aPlace['sNameDetails'])) $aFilteredPlaces['properties']['namedetails'] = $aPlace['sNameDetails'];
+ if (isset($aPlace['sExtraTags'])) {
+ $aFilteredPlaces['properties']['extratags'] = $aPlace['sExtraTags'];
+ }
+ if (isset($aPlace['sNameDetails'])) {
+ $aFilteredPlaces['properties']['namedetails'] = $aPlace['sNameDetails'];
+ }
if (isset($aPlace['aBoundingBox'])) {
$aFilteredPlaces['bbox'] = array(