]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/template/details-json.php
Merge branch 'osm-search:master' into check-database-on-frozen-database
[nominatim.git] / lib-php / template / details-json.php
index 4edddca30f7f5c3897c3fbb17eaf1b14cecb08bd..ae80a85b262a205b108c5d58526a920213200b61 100644 (file)
@@ -1,4 +1,12 @@
 <?php
+/**
+ * SPDX-License-Identifier: GPL-2.0-only
+ *
+ * This file is part of Nominatim. (https://nominatim.org)
+ *
+ * Copyright (C) 2022 by the Nominatim developer community.
+ * For a full list of authors see the git log.
+ */
 
 $aPlaceDetails = array();
 
@@ -40,7 +48,7 @@ $aPlaceDetails['centroid'] = array(
                               'coordinates' => array( (float) $aPointDetails['lon'], (float) $aPointDetails['lat'] )
                              );
 
-$aPlaceDetails['geometry'] = json_decode($aPointDetails['asgeojson']);
+$aPlaceDetails['geometry'] = json_decode($aPointDetails['asgeojson'], true);
 
 $funcMapAddressLine = function ($aFull) {
     return array(