]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/details.php
show address tags and postcode in details
[nominatim.git] / website / details.php
index 7f0a951faa0e30f080fbff00aadffaa5e1ade0a0..5b52e2cc0577503443f1e945055fa8377e823739 100755 (executable)
@@ -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);