mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
factor out link formatting function and osm type translation
This commit is contained in:
@@ -25,8 +25,7 @@
|
||||
foreach($aSearchResults as $iResNum => $aResult)
|
||||
{
|
||||
echo "<place place_id='".$aResult['place_id']."'";
|
||||
$sOSMType = ($aResult['osm_type'] == 'N'?'node':($aResult['osm_type'] == 'W'?'way':($aResult['osm_type'] == 'R'?'relation':
|
||||
($aResult['osm_type'] == 'T'?'tiger':($aResult['osm_type'] == 'I'?'interpolation':'')))));
|
||||
$sOSMType = formatOSMType($aResult['osm_type']);
|
||||
if ($sOSMType)
|
||||
{
|
||||
echo " osm_type='$sOSMType'";
|
||||
|
||||
Reference in New Issue
Block a user