X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/27af9b102c2d6167b9025d594f8cb75e4dd76a03..399b04596e651f9cbcd8a340b1e13a48aededccb:/lib-php/template/address-geojson.php diff --git a/lib-php/template/address-geojson.php b/lib-php/template/address-geojson.php index 135504d3..dc3c3832 100644 --- a/lib-php/template/address-geojson.php +++ b/lib-php/template/address-geojson.php @@ -1,4 +1,12 @@ array() ); - if (isset($aPlace['place_id'])) $aFilteredPlaces['properties']['place_id'] = $aPlace['place_id']; + if (isset($aPlace['place_id'])) { + $aFilteredPlaces['properties']['place_id'] = $aPlace['place_id']; + } $sOSMType = formatOSMType($aPlace['osm_type']); if ($sOSMType) { $aFilteredPlaces['properties']['osm_type'] = $sOSMType; @@ -55,7 +65,7 @@ if (empty($aPlace)) { } if (isset($aPlace['asgeojson'])) { - $aFilteredPlaces['geometry'] = json_decode($aPlace['asgeojson']); + $aFilteredPlaces['geometry'] = json_decode($aPlace['asgeojson'], true); } else { $aFilteredPlaces['geometry'] = array( 'type' => 'Point',