mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-23 13:44:36 +03:00
show address tags and postcode in details
This commit is contained in:
parent
d59d57957c
commit
16053e81bf
@ -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']) );
|
||||
|
||||
?>
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user