]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/details-json.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / template / details-json.php
index 3cf233d4ba72518654ae2879fa3214cc00b744a9..288c914c10294c9bc0c2d7817f97ba8c879e7b08 100644 (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['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']);
 
 
 $aPlaceDetails['geometry'] = json_decode($aPointDetails['asgeojson']);