X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fa1f23edfbd0672ae430722152314ecc69615b56..6a4192d3d18e9db2dce7d8f9f1b229d5ae9f7c6f:/lib/template/address-json.php?ds=sidebyside diff --git a/lib/template/address-json.php b/lib/template/address-json.php index 0a1d074a..691d6a74 100644 --- a/lib/template/address-json.php +++ b/lib/template/address-json.php @@ -1,28 +1,62 @@ getAddressNames(); + } + 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['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);