/?atcStyle query option

This commit is contained in:
Matthias Wirth
2025-05-05 17:03:53 +00:00
parent 0bff5464cf
commit cbb0ee1089
5 changed files with 17 additions and 8 deletions

View File

@@ -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.

View File

@@ -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)

View File

@@ -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) {

View File

@@ -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;
}
}

View File

@@ -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;
}