X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/832547f192904a9ec92e173c27a91e0874fcc757..12168e3ca9421ab1d0195507919c26ce029ce155:/lib/template/search-json.php diff --git a/lib/template/search-json.php b/lib/template/search-json.php index ee2b4bd2..b997f6d9 100644 --- a/lib/template/search-json.php +++ b/lib/template/search-json.php @@ -1,33 +1,28 @@ $aPointDetails) -{ +foreach ($aSearchResults as $iResNum => $aPointDetails) { $aPlace = array( - 'place_id'=>$aPointDetails['place_id'], - 'licence'=>"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright", - ); + 'place_id'=>$aPointDetails['place_id'], + 'licence'=>'Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright', + ); $sOSMType = formatOSMType($aPointDetails['osm_type']); - if ($sOSMType) - { + if ($sOSMType) { $aPlace['osm_type'] = $sOSMType; $aPlace['osm_id'] = $aPointDetails['osm_id']; } - if (isset($aPointDetails['aBoundingBox'])) - { + if (isset($aPointDetails['aBoundingBox'])) { $aPlace['boundingbox'] = $aPointDetails['aBoundingBox']; - if (isset($aPointDetails['aPolyPoints']) && $bShowPolygons) - { + if (isset($aPointDetails['aPolyPoints'])) { $aPlace['polygonpoints'] = $aPointDetails['aPolyPoints']; } } - if (isset($aPointDetails['zoom'])) - { + if (isset($aPointDetails['zoom'])) { $aPlace['zoom'] = $aPointDetails['zoom']; } @@ -40,33 +35,27 @@ foreach($aSearchResults as $iResNum => $aPointDetails) $aPlace['importance'] = $aPointDetails['importance']; - if (isset($aPointDetails['icon']) && $aPointDetails['icon']) - { + if (isset($aPointDetails['icon']) && $aPointDetails['icon']) { $aPlace['icon'] = $aPointDetails['icon']; } - if (isset($aPointDetails['address'])) - { + if (isset($aPointDetails['address'])) { $aPlace['address'] = $aPointDetails['address']; } - if (isset($aPointDetails['asgeojson'])) - { + if (isset($aPointDetails['asgeojson'])) { $aPlace['geojson'] = json_decode($aPointDetails['asgeojson']); } - if (isset($aPointDetails['assvg'])) - { + if (isset($aPointDetails['assvg'])) { $aPlace['svg'] = $aPointDetails['assvg']; } - if (isset($aPointDetails['astext'])) - { + if (isset($aPointDetails['astext'])) { $aPlace['geotext'] = $aPointDetails['astext']; } - if (isset($aPointDetails['askml'])) - { + if (isset($aPointDetails['askml'])) { $aPlace['geokml'] = $aPointDetails['askml']; }