remove some old adsbexchange customisation
keep some functionality around for any aggregator to use by setting aggregator = true; in early.js
This commit is contained in:
@@ -118,7 +118,7 @@ Then F5 to refresh the web interface in the browser.
|
||||
|
||||
If your instance is not at /tar1090 you'll need to edit the config.js in the approppriate html folder, see "Multiple instances".
|
||||
|
||||
## Enable Share links to ADSB-X
|
||||
## Enable Share links to ADSB-X or other websites using tar1090
|
||||
```
|
||||
# ENABLE:
|
||||
sudo sed -i -e 's?.*shareBaseUrl.*?shareBaseUrl = "https://globe.adsbexchange.com/";?' /usr/local/share/tar1090/html/config.js
|
||||
|
||||
@@ -262,6 +262,9 @@ MapboxAPIKey = null;
|
||||
// imageConfigText = "";
|
||||
|
||||
//flightawareLinks = false;
|
||||
//shareBaseUrl = 'https://adsb.lol/';
|
||||
//shareBaseUrl = 'https://globe.adsb.fi/';
|
||||
//shareBaseUrl = 'https://globe.airplanes.live/';
|
||||
//shareBaseUrl = 'https://globe.adsbexchange.com/';
|
||||
// planespottersLinks = false;
|
||||
|
||||
|
||||
@@ -439,3 +439,4 @@ let prefer978 = 0;
|
||||
let dynGlobeRate = false; // enable use of globeRates.json in index.html directory to steer client refresh rate
|
||||
|
||||
let multiOutline = false;
|
||||
let inhibitIframe = false;
|
||||
|
||||
@@ -16,7 +16,7 @@ let loadFinished = false;
|
||||
let Dump1090Version = "unknown version";
|
||||
let RefreshInterval = 1000;
|
||||
let globeSimLoad = 6;
|
||||
let adsbexchange = false;
|
||||
let aggregator = false;
|
||||
let enable_uat = false;
|
||||
let enable_pf_data = false;
|
||||
let HistoryChunks = false;
|
||||
@@ -154,8 +154,8 @@ var fakeLocalStorage = function() {
|
||||
};
|
||||
|
||||
|
||||
if (window.location.href.match(/adsbexchange.com/) && window.location.pathname == '/') {
|
||||
adsbexchange = true;
|
||||
if (window.location.href.match(/aggregator.com/) && window.location.pathname == '/') {
|
||||
aggregator = true;
|
||||
}
|
||||
if (0 && window.self != window.top) {
|
||||
fakeLocalStorage();
|
||||
@@ -217,7 +217,7 @@ if (feed != null) {
|
||||
for (let i in split) {
|
||||
uuid.push(encodeURIComponent(split[i]));
|
||||
}
|
||||
if (uuid[0].length > 18) {
|
||||
if (uuid[0].length > 18 && window.location.href.match(/adsbexchange.com/)) {
|
||||
console.log('redirecting the idiot, oui!');
|
||||
let URL = 'https://www.adsbexchange.com/api/feeders/tar1090/?feed=' + uuid[0];
|
||||
console.log(URL);
|
||||
@@ -412,9 +412,9 @@ let test_chunk_defer;
|
||||
const hostname = window.location.hostname;
|
||||
if (uuid) {
|
||||
// don't need receiver / chunks json
|
||||
} else if (0 || (adsbexchange && (hostname.startsWith('globe.') || hostname.startsWith('globe-')))) {
|
||||
console.log("Using adsbexchange fast-path load!");
|
||||
let data = {"zstd":true,"reapi":true,"refresh":1600,"history":1,"dbServer":true,"binCraft":true,"globeIndexGrid":3,"globeIndexSpecialTiles":[],"version":"adsbexchange backend"};
|
||||
} else if (aggregator) {
|
||||
console.log("Using aggregator fast-path load!");
|
||||
let data = {"zstd":true,"reapi":true,"refresh":1000,"history":1,"dbServer":true,"binCraft":true,"globeIndexGrid":3,"globeIndexSpecialTiles":[],"version":"aggregator backend"};
|
||||
get_receiver_defer = jQuery.Deferred().resolve(data);
|
||||
test_chunk_defer = jQuery.Deferred().reject();
|
||||
} else {
|
||||
@@ -832,7 +832,8 @@ function webAssemblyFail(e) {
|
||||
if (!reapi) {
|
||||
binCraft = false;
|
||||
}
|
||||
if (adsbexchange && !uuid) {
|
||||
// this enforcing should not be needed
|
||||
if (0 && aggregator && !uuid) {
|
||||
inhibitFetch = true;
|
||||
reApi = false;
|
||||
jQuery("#generic_error_detail").text("Your browser is not supporting webassembly, this website does not work without webassembly.");
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<span class=credits-image></span>
|
||||
</td>
|
||||
<td>
|
||||
<span class=credits-text>adsbexchange.com</span>
|
||||
<span class=credits-text>aggregator.com</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -784,7 +784,7 @@
|
||||
</div>
|
||||
<div style="display: none" id="credits">
|
||||
<span class=credits-image></span>
|
||||
<span class=credits-text>adsbexchange.com</span>
|
||||
<span class=credits-text>aggregator.com</span>
|
||||
</div>
|
||||
<div id="header_top" class="infoHeading">
|
||||
<div class="buttonContainer">
|
||||
@@ -855,24 +855,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id='adsbexchange_header' class="infoblock_row hidden">
|
||||
<tr id='aggregator_header' class="infoblock_row hidden">
|
||||
<td style="text-align: center">
|
||||
<div>
|
||||
<span class="largeText">Improve Coverage:<br><a class="largeText" target="_blank" href="https://adsbexchange.com/how-to-feed/">adsbexchange.com</a></span>
|
||||
<span class="largeText">Improve Coverage:<br><a class="largeText" target="_blank" href="https://aggregator.com/how-to-feed/">aggregator.com</a></span>
|
||||
</div>
|
||||
<div class="rSpacer"></div>
|
||||
<div class="rSpacer"></div>
|
||||
<div class="rSpacer"></div>
|
||||
<div>
|
||||
<span class="largeText">
|
||||
<a id="premium_text" class="largeText" href="https://store.adsbexchange.com/pages/subscription">Premium Login: no ads / Sat. Layer</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="rSpacer"></div>
|
||||
<div>
|
||||
<span class="largeText">
|
||||
<a class="largeText" target="_blank" href="https://adsbexchange.com/faq/">FAQ</a>
|
||||
<a class="largeText" target="_blank" href="https://aggregator.com/faq/">FAQ</a>
|
||||
  
|
||||
<a class="largeText" target="_blank" href="https://adsbexchange.com/map-help/">Map Help</a>
|
||||
<a class="largeText" target="_blank" href="https://aggregator.com/map-help/">Map Help</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="rSpacer">
|
||||
|
||||
148
html/layers.js
148
html/layers.js
@@ -61,30 +61,16 @@ function createBaseLayers() {
|
||||
}));
|
||||
}
|
||||
|
||||
if (adsbexchange) {
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.OSM({
|
||||
"url" : "https://map.adsbexchange.com/mapproxy/tiles/1.0.0/osm/osm_grid/{z}/{x}/{y}.png",
|
||||
attributionsCollapsible: false,
|
||||
maxZoom: 16,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'osm_adsbx',
|
||||
title: 'OpenStreetMap ADSBx',
|
||||
type: 'base',
|
||||
}));
|
||||
} else {
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.OSM({
|
||||
maxZoom: 17,
|
||||
attributionsCollapsible: false,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'osm',
|
||||
title: 'OpenStreetMap',
|
||||
type: 'base',
|
||||
}));
|
||||
}
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.OSM({
|
||||
maxZoom: 17,
|
||||
attributionsCollapsible: false,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'osm',
|
||||
title: 'OpenStreetMap',
|
||||
type: 'base',
|
||||
}));
|
||||
|
||||
let basemap_id = "rastertiles/voyager";
|
||||
world.push(new ol.layer.Tile({
|
||||
@@ -101,75 +87,19 @@ function createBaseLayers() {
|
||||
type: 'base',
|
||||
}));
|
||||
|
||||
if (!adsbexchange) {
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.OSM({
|
||||
"url" : "https://{a-d}.tile.openstreetmap.de/{z}/{x}/{y}.png",
|
||||
attributionsCollapsible: false,
|
||||
maxZoom: 17,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'osm_de',
|
||||
title: 'OpenStreetMap DE',
|
||||
type: 'base',
|
||||
}));
|
||||
}
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.OSM({
|
||||
"url" : "https://{a-d}.tile.openstreetmap.de/{z}/{x}/{y}.png",
|
||||
attributionsCollapsible: false,
|
||||
maxZoom: 17,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'osm_de',
|
||||
title: 'OpenStreetMap DE',
|
||||
type: 'base',
|
||||
}));
|
||||
|
||||
if (false && adsbexchange) {
|
||||
jQuery('#premium_text').updateText('Premium active!');
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.XYZ({
|
||||
url: "https://api.maptiler.com/tiles/satellite-v2/{z}/{x}/{y}.jpg?key=HyIQ6A88uTDdX4n4MNVY",
|
||||
attributions: '<a href="https://www.maptiler.com/copyright/" target="_blank">© MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a>',
|
||||
attributionsCollapsible: false,
|
||||
maxZoom: 19,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'maptiler_sat',
|
||||
title: 'Satellite (Premium)',
|
||||
type: 'base',
|
||||
}));
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.XYZ({
|
||||
url: "https://api.maptiler.com/maps/hybrid/256/{z}/{x}/{y}.jpg?key=HyIQ6A88uTDdX4n4MNVY",
|
||||
attributions: '<a href="https://www.maptiler.com/copyright/" target="_blank">© MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a>',
|
||||
attributionsCollapsible: false,
|
||||
maxZoom: 19,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'maptiler_hybrid',
|
||||
title: 'Hybrid Sat. (Premium)',
|
||||
type: 'base',
|
||||
}));
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.XYZ({
|
||||
url: "https://api.maptiler.com/maps/777ad15e-3e64-4edf-8e86-84ba16e50961/256/{z}/{x}/{y}.png?key=geutV4UHZB7QFdlzE3w4",
|
||||
attributions: '<a href="https://www.maptiler.com/copyright/" target="_blank">© MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a>',
|
||||
attributionsCollapsible: false,
|
||||
maxZoom: 19,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'maptiler_custom',
|
||||
title: 'ADSBx Custom (Premium)',
|
||||
type: 'base',
|
||||
}));
|
||||
}
|
||||
if (0 && adsbexchange) {
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.XYZ({
|
||||
url: "https://api.maptiler.com/maps/256/{z}/{x}/{y}.png?key=HyIQ6A88uTDdX4n4MNVY",
|
||||
attributions: '<a href="https://www.maptiler.com/copyright/" target="_blank">© MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a>',
|
||||
attributionsCollapsible: false,
|
||||
maxZoom: 16,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'maptiler_english',
|
||||
title: 'English MapTiler (testing)',
|
||||
type: 'base',
|
||||
}));
|
||||
}
|
||||
|
||||
if (!adsbexchange) {
|
||||
if (1) {
|
||||
world.push(new ol.layer.Tile({
|
||||
source: new ol.source.XYZ({
|
||||
url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
||||
@@ -227,7 +157,7 @@ function createBaseLayers() {
|
||||
if (0) {
|
||||
let vtlayer = new ol.layer.VectorTile({
|
||||
source: new ol.source.VectorTile({
|
||||
url: "http://test02.dev.adsbexchange.com/tiles/{z}/{x}/{y}.pbf",
|
||||
url: "http://test02.dev.adsf.com/tiles/{z}/{x}/{y}.pbf",
|
||||
format: new ol.format.MVT(),
|
||||
maxZoom: 9,
|
||||
transition: tileTransition,
|
||||
@@ -446,38 +376,6 @@ function createBaseLayers() {
|
||||
enra: "IFR Area Charts",
|
||||
secgrids: "Sect. w/ SAR grid",
|
||||
};
|
||||
let chartbundleTypesAx = {
|
||||
};
|
||||
if (adsbexchange) {
|
||||
chartbundleTypesDirect = {
|
||||
secgrids: "Sect. w/ SAR grid",
|
||||
};
|
||||
chartbundleTypesAx = {
|
||||
sec: "Sectional Charts",
|
||||
enrh: "IFR Enroute High Charts",
|
||||
|
||||
tac: "Terminal Area Charts",
|
||||
hel: "Helicopter Charts",
|
||||
enrl: "IFR Enroute Low Charts",
|
||||
enra: "IFR Area Charts",
|
||||
};
|
||||
}
|
||||
|
||||
for (let type in chartbundleTypesAx) {
|
||||
us.push(new ol.layer.Tile({
|
||||
source: new ol.source.OSM({
|
||||
url: 'https://map.adsbexchange.com/mapproxy/tiles/1.0.0/'+ type + '/osm_grid/{z}/{x}/{y}.png',
|
||||
projection: 'EPSG:3857',
|
||||
attributions: 'Tiles courtesy of <a href="http://www.chartbundle.com/">ChartBundle</a>',
|
||||
attributionsCollapsible: false,
|
||||
maxZoom: 11,
|
||||
transition: tileTransition,
|
||||
}),
|
||||
name: 'chartbundle_' + type,
|
||||
title: chartbundleTypesAx[type],
|
||||
type: 'base',
|
||||
group: 'chartbundle'}));
|
||||
}
|
||||
|
||||
for (let type in chartbundleTypesDirect) {
|
||||
us.push(new ol.layer.Tile({
|
||||
|
||||
@@ -2710,7 +2710,7 @@ PlaneObject.prototype.checkVisible = function() {
|
||||
const refresh = lastRefreshInt / 1000;
|
||||
const noInfoTimeout = replay ? 600 : (reApi ? (30 + 2 * refresh) : (30 + Math.min(1, (globeTilesViewCount / globeSimLoad)) * (2 * refresh)));
|
||||
const modeSTime = (guessModeS && this.dataSource == "modeS") ? 300 : 0;
|
||||
const tisbReduction = (adsbexchange && this.icao[0] == '~') ? 15 : 0;
|
||||
const tisbReduction = (globeIndex && this.icao[0] == '~') ? 15 : 0;
|
||||
// If no packet in over 58 seconds, clear the plane.
|
||||
// Only clear the plane if it's not selected individually
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ function processReceiverUpdate(data, init) {
|
||||
globeIndexNow[data.globeIndex] = data.now;
|
||||
}
|
||||
|
||||
if (!(uat || init || (globeIndex && adsbexchange))) {
|
||||
if (!(uat || init || (globeIndex && aggregator))) {
|
||||
updateMessageRate(data);
|
||||
}
|
||||
|
||||
@@ -1692,15 +1692,17 @@ jQuery('#selected_altitude_geom1')
|
||||
|
||||
TAR.altitudeChart.init();
|
||||
|
||||
if (adsbexchange) {
|
||||
jQuery('#adsbexchange_header').show();
|
||||
if (aggregator) {
|
||||
jQuery('#aggregator_header').show();
|
||||
jQuery('#credits').show();
|
||||
if (!onMobile) {
|
||||
jQuery('#creditsSelected').show();
|
||||
}
|
||||
jQuery('#selected_infoblock').addClass('adsbx-selected-bg');
|
||||
if (false && window.self != window.top) {
|
||||
window.top.location.href = "https://www.adsbexchange.com/";
|
||||
jQuery('#selected_infoblock').addClass('aggregator-selected-bg');
|
||||
|
||||
// activate to prevent iframe use
|
||||
if (inhibitIframe && window.self != window.top) {
|
||||
window.top.location.href = "https://www.aggregator.com/";
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2015,7 +2017,7 @@ function setIntervalTimers() {
|
||||
jQuery("#timers_paused").css('display','none');
|
||||
}
|
||||
console.log(localTime(new Date()) + " set timers ");
|
||||
if ((adsbexchange || dynGlobeRate) && !uuid) {
|
||||
if (dynGlobeRate && !uuid) {
|
||||
timers.globeRateUpdate = setInterval(globeRateUpdate, 180000);
|
||||
}
|
||||
pollPositionInterval();
|
||||
@@ -2401,11 +2403,7 @@ function ol_map_init() {
|
||||
}
|
||||
});
|
||||
if (!foundType) {
|
||||
if (adsbexchange) {
|
||||
MapType_tar1090 = "osm_adsbx";
|
||||
} else {
|
||||
MapType_tar1090 = "osm";
|
||||
}
|
||||
MapType_tar1090 = "osm";
|
||||
}
|
||||
|
||||
ol.control.LayerSwitcher.forEachRecursive(layers_group, function(lyr) {
|
||||
@@ -2605,7 +2603,7 @@ function initMap() {
|
||||
zoomLvl = Number(loStore['zoomLvl']) || DefaultZoomLvl;
|
||||
zoomLvlCache = zoomLvl;
|
||||
|
||||
if (globeIndex && adsbexchange) {
|
||||
if (globeIndex && aggregator) {
|
||||
jQuery('#dump1090_total_history_td').hide();
|
||||
jQuery('#dump1090_message_rate_td').hide();
|
||||
}
|
||||
@@ -6361,7 +6359,7 @@ function refreshInt() {
|
||||
if (!mapIsVisible)
|
||||
refresh *= 2;
|
||||
|
||||
if (adsbexchange && window.self != window.top) {
|
||||
if (aggregator && window.self != window.top) {
|
||||
refresh *= 1.5;
|
||||
} else if (onMobile && TrackedAircraftPositions > 800) {
|
||||
refresh *= 1.5;
|
||||
@@ -8763,7 +8761,7 @@ function requestBoxString() {
|
||||
return `${extent.minLat.toFixed(6)},${extent.maxLat.toFixed(6)},${minLon},${maxLon}`;
|
||||
}
|
||||
|
||||
if (adsbexchange && window.location.hostname.startsWith('inaccurate')) {
|
||||
if (aggregator && window.location.hostname.startsWith('inaccurate')) {
|
||||
jQuery('#inaccurate_warning').removeClass('hidden');
|
||||
document.getElementById('inaccurate_warning').innerHTML = `
|
||||
<br>
|
||||
@@ -8823,12 +8821,14 @@ function adjust_baro_alt(alt) {
|
||||
}
|
||||
|
||||
function globeRateUpdate() {
|
||||
if (adsbexchange) {
|
||||
if (aggregator) {
|
||||
dynGlobeRate = true;
|
||||
const cookieExp = getCookie('adsbx_sid').split('_')[0];
|
||||
const ts = new Date().getTime();
|
||||
if (!cookieExp || cookieExp < ts + 3600*1000)
|
||||
setCookie('adsbx_sid', ((ts + 2*86400*1000) + '_' + Math.random().toString(36).substring(2, 15)), 2);
|
||||
if (0) {
|
||||
const cookieExp = getCookie('asdf_id').split('_')[0];
|
||||
const ts = new Date().getTime();
|
||||
if (!cookieExp || cookieExp < ts + 3600*1000)
|
||||
setCookie('adsbx_sid', ((ts + 2*86400*1000) + '_' + Math.random().toString(36).substring(2, 15)), 2);
|
||||
}
|
||||
}
|
||||
if (dynGlobeRate) {
|
||||
return jQuery.ajax({url:'/globeRates.json', cache: false, dataType: 'json', }).done(function(data) {
|
||||
|
||||
@@ -50,7 +50,7 @@ select {
|
||||
z-index: 1;
|
||||
background-color: var(--BGCOLOR1);
|
||||
}
|
||||
.adsbx-selected-bg:before {
|
||||
.aggregator-selected-bg:before {
|
||||
content: ' ';
|
||||
position:absolute;
|
||||
display:block;
|
||||
@@ -61,7 +61,7 @@ select {
|
||||
background-size: calc( 148 * var(--SCALE)) calc( 148 * var(--SCALE));
|
||||
background-repeat: no-repeat;
|
||||
background-position: calc( 7px * var(--SCALE)) calc( 108px * var(--SCALE));
|
||||
background-image: url("images/cropped-Stealth-1-192x192.png");
|
||||
background-image: url("images/aggregator-logo.png");
|
||||
z-index:2;
|
||||
opacity: 0.12;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ select {
|
||||
background-position: 0;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
background-image: url("images/cropped-Stealth-1-48x48.png");
|
||||
background-image: url("images/aggregator-logo.png");
|
||||
z-index: 99;
|
||||
opacity: 0.7;
|
||||
margin: 4px;
|
||||
|
||||
Reference in New Issue
Block a user