X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6a7e0d652b1d40a397e1c1386d500101796676c4..27af9b102c2d6167b9025d594f8cb75e4dd76a03:/lib-php/template/search-json.php diff --git a/lib-php/template/search-json.php b/lib-php/template/search-json.php index 4b896d08..6f729c29 100644 --- a/lib-php/template/search-json.php +++ b/lib-php/template/search-json.php @@ -6,7 +6,7 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) { 'place_id'=>$aPointDetails['place_id'], 'licence'=>'Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright', ); - + $sOSMType = formatOSMType($aPointDetails['osm_type']); if ($sOSMType) { $aPlace['osm_type'] = $sOSMType; @@ -60,8 +60,12 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) { $aPlace['geokml'] = $aPointDetails['askml']; } - if (isset($aPointDetails['sExtraTags'])) $aPlace['extratags'] = $aPointDetails['sExtraTags']; - if (isset($aPointDetails['sNameDetails'])) $aPlace['namedetails'] = $aPointDetails['sNameDetails']; + if (isset($aPointDetails['sExtraTags'])) { + $aPlace['extratags'] = $aPointDetails['sExtraTags']; + } + if (isset($aPointDetails['sNameDetails'])) { + $aPlace['namedetails'] = $aPointDetails['sNameDetails']; + } $aFilteredPlaces[] = $aPlace; }