diff --git a/htdocs/map.js b/htdocs/map.js index af879d0..9a5141f 100644 --- a/htdocs/map.js +++ b/htdocs/map.js @@ -37,6 +37,7 @@ $(function(){ var retention_time = 2 * 60 * 60 * 1000; var strokeOpacity = 0.8; var fillOpacity = 0.35; + var callsign_url = null; var colorKeys = {}; var colorScale = chroma.scale(['red', 'blue', 'green']).mode('hsl'); @@ -286,6 +287,9 @@ $(function(){ if ('map_position_retention_time' in config) { retention_time = config.map_position_retention_time * 1000; } + if ('callsign_url' in config) { + callsign_url = config['callsign_url']; + } break; case "update": processUpdates(json.value); @@ -340,6 +344,15 @@ $(function(){ return infowindow; } + var linkifyCallsign = function(callsign) { + if ((callsign_url == null) || (callsign_url == '')) + return callsign; + else + return '' + callsign + ''; + }; + var infowindow; var showLocatorInfoWindow = function(locator, pos) { var infowindow = getInfoWindow(); @@ -357,7 +370,7 @@ $(function(){ '