X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/27af9b102c2d6167b9025d594f8cb75e4dd76a03..151b3c40211dd090dfd5998f2c700319d6de0cf6:/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',