X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6b65b9086b4434c6cc69bf4c8a3f778af5b91115..fb9a0414ffdb376422cc6ec7d519fff60255af7b:/lib/template/search-jsonv2.php diff --git a/lib/template/search-jsonv2.php b/lib/template/search-jsonv2.php index fa801ac4..2b8c2c28 100644 --- a/lib/template/search-jsonv2.php +++ b/lib/template/search-jsonv2.php @@ -50,7 +50,27 @@ $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; } - javascript_renderData($aFilteredPlaces); + javascript_renderData($aFilteredPlaces, array('geojson'));