]> git.openstreetmap.org Git - nominatim.git/commitdiff
show address tags and postcode in details
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 1 Jul 2017 21:16:01 +0000 (23:16 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 19 Aug 2017 17:37:05 +0000 (19:37 +0200)
lib/template/details-html.php
website/details.php

index 46b6a50cb2d2c916281c3a95f5244afdb8938b43..7681839563fe6f4d4d10a0d8b381b473695482c2 100644 (file)
                         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']) );
 
                 ?>
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);