X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7a31a3d106a2ee0133ece09dfa6a29a0f2894b57..275f3b26560a44099dff762776277812ef0f122f:/lib/template/details-json.php diff --git a/lib/template/details-json.php b/lib/template/details-json.php index 3cf233d4..288c914c 100644 --- a/lib/template/details-json.php +++ b/lib/template/details-json.php @@ -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']);