X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a9c06d89c144fb90616e3a780029fe3d9bcfd90d..b522ea6dc77f39132d6ab4b288fb18c25d2104c0:/lib/output.php diff --git a/lib/output.php b/lib/output.php index fd6226bc..9d4b7502 100644 --- a/lib/output.php +++ b/lib/output.php @@ -39,3 +39,14 @@ function detailsLink($aFeature, $sTitle = false) return ''.($sTitle?$sTitle:$aFeature['place_id']).''; } + +function detailsPermaLink($aFeature, $sRefText = false) +{ + $sOSMType = formatOSMType($aFeature['osm_type'], false); + + if ($sOSMType) { + $sLabel = $sRefText ? $sRefText : $sOSMType.' '.$aFeature['osm_id']; + return ''.$sLabel.''; + } + return ''; +}