X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/db3ced17bbfff00411f506d8c84419c875959d5e..27af9b102c2d6167b9025d594f8cb75e4dd76a03:/lib-php/template/address-geojson.php diff --git a/lib-php/template/address-geojson.php b/lib-php/template/address-geojson.php index 089a86b6..135504d3 100644 --- a/lib-php/template/address-geojson.php +++ b/lib-php/template/address-geojson.php @@ -3,9 +3,11 @@ $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( @@ -36,8 +38,12 @@ if (empty($aPlace)) { 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(