]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-json.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / template / search-json.php
index dd75ad871af0abfdd34c7db7e7339add0f9d2e51..45272d3540dc822511148b3bd1b5bcfb6ef80075 100644 (file)
@@ -39,7 +39,7 @@
 
                $aPlace['class'] = $aPointDetails['class'];
                $aPlace['type'] = $aPointDetails['type'];
-               if ($aPointDetails['icon'])
+               if (isset($aPointDetails['icon']) && $aPointDetails['icon'])
                {
                        $aPlace['icon'] = $aPointDetails['icon'];
                }
                        $aPlace['address'] = $aPointDetails['address'];
                 }
 
+                if (isset($aResult['asgeojson']))
+                {
+                        $aPlace['geojson'] = json_decode($aResult['asgeojson']);
+                }
+
+                if (isset($aResult['assvg']))
+                {
+                        $aPlace['svg'] = $aResult['assvg'];
+                }
+
+                if (isset($aResult['astext']))
+                {
+                        $aPlace['geotext'] = $aResult['astext'];
+                }
+
+               if (isset($aResult['askml']))
+               {
+                       $aPlace['geokml'] = $aResult['askml'];
+               }
+
                $aFilteredPlaces[] = $aPlace;
        }