return centroid on geojson format

This commit is contained in:
marc tobias 2018-04-09 14:24:31 +02:00 committed by Sarah Hoffmann
parent 7a31a3d106
commit 7a1ee99345

View File

@ -32,9 +32,10 @@ $aPlaceDetails['rank_address'] = (int) $aPointDetails['rank_address'];
$aPlaceDetails['rank_search'] = (int) $aPointDetails['rank_search'];
$aPlaceDetails['isarea'] = ($aPointDetails['isarea'] == 't');
$aPlaceDetails['lat'] = (float) $aPointDetails['lat'];
$aPlaceDetails['lon'] = (float) $aPointDetails['lon'];
$aPlaceDetails['centroid'] = array(
'type' => 'Point',
'coordinates' => array( (float) $aPointDetails['lon'], (float) $aPointDetails['lat'] )
);
$aPlaceDetails['geometry'] = json_decode($aPointDetails['asgeojson']);