+function detailsPermaLink($aFeature, $sRefText = false, $sExtraProperties = false)
+{
+ $sOSMType = formatOSMType($aFeature['osm_type'], false);
+
+ if ($sOSMType) {
+ $sHtml = '<a ';
+ if ($sExtraProperties) {
+ $sHtml .= $sExtraProperties.' ';
+ }
+ $sHtml .= 'href="details.php?osmtype='.$aFeature['osm_type']
+ .'&osmid='.$aFeature['osm_id'].'&class='.$aFeature['class'].'">';
+
+ if ($sRefText) {
+ $sHtml .= $sRefText.'</a>';
+ } else {
+ $sHtml .= $sOSMType.' '.$aFeature['osm_id'].'</a>';
+ }
+
+ return $sHtml;
+ }
+ return detailsLink($aFeature, $sRefText, $sExtraProperties);
+}