X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/c3233cb9512105d65442a40260cf16d8688d76a5..119ffbab40f3422855ca2c769b9e266d6a446d58:/lib/template/address-json.php diff --git a/lib/template/address-json.php b/lib/template/address-json.php index e08b8ac3..691d6a74 100644 --- a/lib/template/address-json.php +++ b/lib/template/address-json.php @@ -1,39 +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);