]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-json.php
replace database settings with dotenv variant
[nominatim.git] / lib / template / search-json.php
index 774b5be08b3e6bca7db863ab6584542986416cbc..4b896d08a6de136207a8e878ff8c2ac73f7e711d 100644 (file)
@@ -15,10 +15,6 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
 
     if (isset($aPointDetails['aBoundingBox'])) {
         $aPlace['boundingbox'] = $aPointDetails['aBoundingBox'];
 
     if (isset($aPointDetails['aBoundingBox'])) {
         $aPlace['boundingbox'] = $aPointDetails['aBoundingBox'];
-
-        if (isset($aPointDetails['aPolyPoints'])) {
-            $aPlace['polygonpoints'] = $aPointDetails['aPolyPoints'];
-        }
     }
 
     if (isset($aPointDetails['zoom'])) {
     }
 
     if (isset($aPointDetails['zoom'])) {
@@ -27,9 +23,10 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
 
     $aPlace['lat'] = $aPointDetails['lat'];
     $aPlace['lon'] = $aPointDetails['lon'];
 
     $aPlace['lat'] = $aPointDetails['lat'];
     $aPlace['lon'] = $aPointDetails['lon'];
+
     $aPlace['display_name'] = $aPointDetails['name'];
 
     $aPlace['display_name'] = $aPointDetails['name'];
 
-    if ($sOutputFormat == 'jsonv2') {
+    if ($sOutputFormat == 'jsonv2' || $sOutputFormat == 'geojson') {
         $aPlace['place_rank'] = $aPointDetails['rank_search'];
         $aPlace['category'] = $aPointDetails['class'];
     } else {
         $aPlace['place_rank'] = $aPointDetails['rank_search'];
         $aPlace['category'] = $aPointDetails['class'];
     } else {
@@ -43,8 +40,8 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
         $aPlace['icon'] = $aPointDetails['icon'];
     }
 
         $aPlace['icon'] = $aPointDetails['icon'];
     }
 
-    if (isset($aPointDetails['address']) && sizeof($aPointDetails['address'])) {
-        $aPlace['address'] = $aPointDetails['address'];
+    if (isset($aPointDetails['address'])) {
+        $aPlace['address'] = $aPointDetails['address']->getAddressNames();
     }
 
     if (isset($aPointDetails['asgeojson'])) {
     }
 
     if (isset($aPointDetails['asgeojson'])) {