X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/032f24bfefcd6c8b5a2211a361430f5523150ab1..03039ebfa85a859bf80b5ed3125e34077d9a1df1:/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 ''; +}