X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/234b1b0293aff8fe8bd13df986805e7d1b39bca2..e842d8793c1c416a75bbae39c004184f1ed66289:/lib/template/details-html.php diff --git a/lib/template/details-html.php b/lib/template/details-html.php index ae36b411..71fcc7b3 100644 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@ -7,7 +7,6 @@ -

".$sTitle."

\n"; } - function osm_link($aFeature) - { - $sOSMType = ($aFeature['osm_type'] == 'N'?'node':($aFeature['osm_type'] == 'W'?'way':($aFeature['osm_type'] == 'R'?'relation':''))); - if ($sOSMType) - { - return ''.$sOSMType.' '.$aFeature['osm_id'].''; - } - return ''; - } - - function wikipedia_link($aFeature) - { - if ($aFeature['wikipedia']) - { - list($sWikipediaLanguage,$sWikipediaArticle) = explode(':',$aFeature['wikipedia']); - return ''.$aFeature['wikipedia'].''; - } - return ''; - } - - function nominatim_link($aFeature, $sTitle) - { - return ''.$sTitle.''; - } function format_distance($fDistance) { @@ -92,10 +67,10 @@ echo ''."\n"; echo ' '.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'No Name')."\n"; echo ' ' . $aAddressLine['class'].':'.$aAddressLine['type'] . "\n"; - echo ' ' . osm_link($aAddressLine) . "\n"; + echo ' ' . osmLink($aAddressLine) . "\n"; echo ' ' . (isset($aAddressLine['admin_level']) ? $aAddressLine['admin_level'] : '') . "\n"; echo ' ' . format_distance($aAddressLine['distance'])."\n"; - echo ' ' . nominatim_link($aAddressLine,'details >') . "\n"; + echo ' ' . detailsLink($aAddressLine,'details >') . "\n"; echo "\n"; } @@ -143,10 +118,10 @@ } kv('Coverage' , ($aPointDetails['isarea']=='t'?'Polygon':'Point') ); kv('Centre Point' , $aPointDetails['lat'].','.$aPointDetails['lon'] ); - kv('OSM' , osm_link($aPointDetails) ); + kv('OSM' , osmLink($aPointDetails) ); if ($aPointDetails['wikipedia']) { - kv('Wikipedia Calculated' , wikipedia_link($aPointDetails) ); + kv('Wikipedia Calculated' , wikipediaLink($aPointDetails) ); } kv('Extra Tags' , hash_to_subtable($aPointDetails['aExtraTags']) );