X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/75ec3326e1f10e72b9ce8e2a11a9c4d5db2c881d..c9d51fe7b8c915e898d95af57dc2c013b9cf84a0:/lib/template/address-jsonv2.php diff --git a/lib/template/address-jsonv2.php b/lib/template/address-jsonv2.php index 3176da54..f9592d8b 100644 --- a/lib/template/address-jsonv2.php +++ b/lib/template/address-jsonv2.php @@ -21,7 +21,14 @@ $aFilteredPlaces['osm_type'] = $sOSMType; $aFilteredPlaces['osm_id'] = $aPlace['osm_id']; } + if (isset($aPlace['lat'])) $aFilteredPlaces['lat'] = $aPlace['lat']; + if (isset($aPlace['lon'])) $aFilteredPlaces['lon'] = $aPlace['lon']; + $aFilteredPlaces['category'] = $aPlace['class']; + $aFilteredPlaces['type'] = $aPlace['type']; + $aFilteredPlaces['addresstype'] = strtolower($aPlace['addresstype']); + $aFilteredPlaces['display_name'] = $aPlace['langaddress']; + $aFilteredPlaces['name'] = $aPlace['placename']; $aFilteredPlaces['address'] = $aAddress; }