diff --git a/README-query.md b/README-query.md index 27ded53..73f37d8 100644 --- a/README-query.md +++ b/README-query.md @@ -54,6 +54,7 @@ See the main readme for more examples on how to use the filters - mapOrientation=0-360 - normally true north faces up, use this to change which true direction is pointing up. - monochromeMarkers=xxxxxx - set constant html color for markers (parameter is an hexadecimal color). - monochromeTracks=xxxxxx - set constant html color for tracks (parameter is an hexadecimal color). +- atcStyle - use a style somewhat like an ATC display - outlineWidth=value - set width for the for aircraft icons (only works with webGL disabled) - outlineColor=xxxxxx - set outline color (parameter is an hexadecimal color, only works with webGL disabled) - sidebarWidth=xxx - size of sidebar in pixels. diff --git a/html/early.js b/html/early.js index 92f20f2..06396a3 100644 --- a/html/early.js +++ b/html/early.js @@ -237,6 +237,10 @@ let uk_advisory = false; if (usp.has('uk_advisory')) { uk_advisory = true; } +let atcStyle = false; +if (usp.has('atcStyle')) { + atcStyle = true; +} const customTiles = usp.get('customTiles'); if (customTiles) diff --git a/html/markers.js b/html/markers.js index ac0c85a..723d3a5 100644 --- a/html/markers.js +++ b/html/markers.js @@ -1251,7 +1251,7 @@ function getBaseMarker(category, typeDesignator, typeDescription, wtc, addrtype, return ['witchl', 1]; } } - if (uk_advisory) { + if (atcStyle) { return ['asterisk', 1.2]; } if (squareMania) { diff --git a/html/planeObject.js b/html/planeObject.js index e46da97..dc56dac 100644 --- a/html/planeObject.js +++ b/html/planeObject.js @@ -730,7 +730,7 @@ PlaneObject.prototype.getMarkerColor = function(options) { l += ColorByAlt.mlat.l; } - if (uk_advisory && (this.squawk == '7700' || this.squawk == '7600' || this.squawk == '7500')) { + if (atcStyle && (this.squawk == '7700' || this.squawk == '7600' || this.squawk == '7500')) { h = 0; s = 100; l = 40; @@ -865,7 +865,7 @@ PlaneObject.prototype.updateIcon = function() { let speedString = (this.speed == null) ? (NBSP+'?'+NBSP) : format_speed_brief(this.speed, DisplayUnits, showLabelUnits).padStart(3, NBSP); labelText = ""; - if (uk_advisory) { + if (atcStyle) { labelText += callsign + '\n'; labelText += altString + '\n'; labelText += 'x' + this.squawk; @@ -913,7 +913,7 @@ PlaneObject.prototype.updateIcon = function() { labelText += speedString + NBSP + NNBSP + altString.padStart(6, NBSP) + '\n'; } } - if (g.extendedLabels < 3 && !uk_advisory) { + if (g.extendedLabels < 3 && !atcStyle) { labelText += callsign; } } diff --git a/html/script.js b/html/script.js index 6fb0672..6cf61ce 100644 --- a/html/script.js +++ b/html/script.js @@ -896,21 +896,25 @@ function earlyInitPage() { let value; if (uk_advisory) { + defaultOverlays.push('uka_airports'); + defaultOverlays.push('uka_airspaces'); + defaultOverlays.push('uka_runways'); + defaultOverlays.push('uka_shoreham'); + atcStyle = true; + } + if (atcStyle) { labels_top = true; tempTrails = true; tempTrailsTimeout = 45; SiteCirclesDistances = new Array(5, 10, 20); SiteCirclesLineDash = [5, 5]; SiteCirclesColors = ['#2b3436', '#2b3436', '#2b3436']; - defaultOverlays.push('uka_airports'); - defaultOverlays.push('uka_airspaces'); - defaultOverlays.push('uka_runways'); - defaultOverlays.push('uka_shoreham'); MapType_tar1090 = 'carto_light_all'; lineWidth=4; g.enableLabels=true; } + if (usp.has('debugFetch')) { debugFetch = true; }