X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9c0ca064b833ad39eac8ffc2447331d732d1a7d0..54ab72a939e5bb83edc50244c5918223629f9085:/lib/template/search-jsonv2.php?ds=sidebyside diff --git a/lib/template/search-jsonv2.php b/lib/template/search-jsonv2.php index fa801ac4..126f7866 100644 --- a/lib/template/search-jsonv2.php +++ b/lib/template/search-jsonv2.php @@ -36,11 +36,14 @@ $aPlace['lat'] = $aPointDetails['lat']; $aPlace['lon'] = $aPointDetails['lon']; $aPlace['display_name'] = $aPointDetails['name']; - $aPlace['place_rank'] = $aResult['rank_search']; + $aPlace['place_rank'] = $aPointDetails['rank_search']; $aPlace['category'] = $aPointDetails['class']; $aPlace['type'] = $aPointDetails['type']; - if ($aPointDetails['icon']) + + $aPlace['importance'] = $aPointDetails['importance']; + + if (isset($aPointDetails['icon'])) { $aPlace['icon'] = $aPointDetails['icon']; } @@ -50,7 +53,27 @@ $aPlace['address'] = $aPointDetails['address']; } + if (isset($aPointDetails['asgeojson'])) + { + $aPlace['geojson'] = json_decode($aPointDetails['asgeojson']); + } + + if (isset($aPointDetails['assvg'])) + { + $aPlace['svg'] = $aPointDetails['assvg']; + } + + if (isset($aPointDetails['astext'])) + { + $aPlace['geotext'] = $aPointDetails['astext']; + } + + if (isset($aPointDetails['askml'])) + { + $aPlace['geokml'] = $aPointDetails['askml']; + } + $aFilteredPlaces[] = $aPlace; } - javascript_renderData($aFilteredPlaces); + javascript_renderData($aFilteredPlaces, array('geojson'));