X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/78a29b5a876d0c7d4c8b9ccab9f45b15780b4a22..e4963256e1769cf56187d12c0b26b8be61e69b75:/lib/template/address-jsonv2.php?ds=sidebyside diff --git a/lib/template/address-jsonv2.php b/lib/template/address-jsonv2.php index 40c5c56d..89403875 100644 --- a/lib/template/address-jsonv2.php +++ b/lib/template/address-jsonv2.php @@ -36,6 +36,37 @@ if (isset($aPlace['aAddress'])) $aFilteredPlaces['address'] = $aPlace['aAddress']; if (isset($aPlace['sExtraTags'])) $aFilteredPlaces['extratags'] = $aPlace['sExtraTags']; if (isset($aPlace['sNameDetails'])) $aFilteredPlaces['namedetails'] = $aPlace['sNameDetails']; + + if (isset($aPlace['aBoundingBox'])) + { + $aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox']; + + if (isset($aPlace['aPolyPoints']) && $bAsPoints) + { + $aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints']; + } + } + + if (isset($aPlace['asgeojson'])) + { + $aFilteredPlaces['geojson'] = json_decode($aPlace['asgeojson']); + } + + if (isset($aPlace['assvg'])) + { + $aFilteredPlaces['svg'] = $aPlace['assvg']; + } + + if (isset($aPlace['astext'])) + { + $aFilteredPlaces['geotext'] = $aPlace['astext']; + } + + if (isset($aPlace['askml'])) + { + $aFilteredPlaces['geokml'] = $aPlace['askml']; + } + } javascript_renderData($aFilteredPlaces);