X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e686ce868062a70acfbdddc68c8f4384789f0a40..189da9afb3659e194b545dd5a6d9de1b1033c72d:/lib/output.php?ds=sidebyside
diff --git a/lib/output.php b/lib/output.php
index 58f00091..9d4b7502 100644
--- a/lib/output.php
+++ b/lib/output.php
@@ -9,7 +9,7 @@ function formatOSMType($sType, $bIncludeExternal = true)
if (!$bIncludeExternal) return '';
- if ($sType == 'T') return 'tiger';
+ if ($sType == 'T') return 'way';
if ($sType == 'I') return 'way';
return '';
@@ -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 '';
+}