]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-json.php
fix json output of empty arrays
[nominatim.git] / lib / template / search-json.php
index 542e37afdc39b6d9a54b32239e0064b47b9c6d03..3dcaabdbd6393a94bc27b375c1c401db11626a69 100644 (file)
@@ -41,6 +41,9 @@
 
                $aPlace['class'] = $aPointDetails['class'];
                $aPlace['type'] = $aPointDetails['type'];
 
                $aPlace['class'] = $aPointDetails['class'];
                $aPlace['type'] = $aPointDetails['type'];
+
+               $aPlace['importance'] = $aPointDetails['importance'];
+
                if (isset($aPointDetails['icon']) && $aPointDetails['icon'])
                {
                        $aPlace['icon'] = $aPointDetails['icon'];
                if (isset($aPointDetails['icon']) && $aPointDetails['icon'])
                {
                        $aPlace['icon'] = $aPointDetails['icon'];
@@ -71,6 +74,9 @@
                        $aPlace['geokml'] = $aPointDetails['askml'];
                }
 
                        $aPlace['geokml'] = $aPointDetails['askml'];
                }
 
+               if (isset($aPointDetails['sExtraTags'])) $aPlace['extratags'] = $aPointDetails['sExtraTags'];
+               if (isset($aPointDetails['sNameDetails'])) $aPlace['namedetails'] = $aPointDetails['sNameDetails'];
+
                $aFilteredPlaces[] = $aPlace;
        }
 
                $aFilteredPlaces[] = $aPlace;
        }