]> 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 70e9e46bf9cc3dff34c9046aa16ed6d396d32b90..4b3b279d77362c2b9dec8d4ff4a6d411587f82bc 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+       header("content-type: application/json; charset=UTF-8");
+
        $aFilteredPlaces = array();
        foreach($aSearchResults as $iResNum => $aPointDetails)
        {
                        $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;
        }