From: Sarah Hoffmann Date: Sat, 1 Jul 2017 21:16:01 +0000 (+0200) Subject: show address tags and postcode in details X-Git-Tag: v3.1.0~88^2~33 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/16053e81bf9dacc9761de3c833edd0d1c5b20831 show address tags and postcode in details --- diff --git a/lib/template/details-html.php b/lib/template/details-html.php index 46b6a50c..76818395 100644 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@ -124,6 +124,8 @@ kv('Wikipedia Calculated' , wikipediaLink($aPointDetails) ); } + kv('Computed Postcode', $aPointDetails['postcode']); + kv('Address Tags' , hash_to_subtable($aPointDetails['aAddressTags']) ); kv('Extra Tags' , hash_to_subtable($aPointDetails['aExtraTags']) ); ?> diff --git a/website/details.php b/website/details.php index 7f0a951f..5b52e2cc 100755 --- a/website/details.php +++ b/website/details.php @@ -130,6 +130,13 @@ if (PEAR::isError($aPointDetails['aNames'])) { // possible timeout $aPointDetails['aNames'] = []; } +// Address tags +$sSQL = "SELECT (each(address)).key as key,(each(address)).value FROM placex WHERE place_id = $iPlaceID ORDER BY key"; +$aPointDetails['aAddressTags'] = $oDB->getAssoc($sSQL); +if (PEAR::isError($aPointDetails['aAddressTags'])) { // possible timeout + $aPointDetails['aAddressTags'] = []; +} + // Extra tags $sSQL = "SELECT (each(extratags)).key,(each(extratags)).value FROM placex WHERE place_id = $iPlaceID ORDER BY (each(extratags)).key"; $aPointDetails['aExtraTags'] = $oDB->getAssoc($sSQL);