Skip to content

Commit

Permalink
re-order overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
alkissack committed Sep 20, 2023
1 parent a216f12 commit b9e3f08
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 39 deletions.
48 changes: 24 additions & 24 deletions public_html/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,9 @@

function createBaseLayers() {
var layers = [];

var world = [];
var us = [];

// ------------------------------------------------------------
// AKISSACK - DEFAULT MAPS ------------------- ref: AK2A starts
// ------------------------------------------------------------
if (ShowAdditionalMaps) {
world.push(new ol.layer.Tile({
source: new ol.source.OSM({
"url" : "http://{a-c}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png"
}),
name: 'osm light',
title: 'OpenStreetMap Light',
type: 'base',
}));
}
// ------------------------------------------------------------
// ---------------------------------------------- ref: AK2A ends
// ------------------------------------------------------------

world.push(new ol.layer.Tile({
source: new ol.source.OSM(),
name: 'osm',
title: 'OpenStreetMap',
type: 'base',
}));

// ------------------------------------------------------------
// AKISSACK - additional MAPS ---------------- ref: AK2B starts
Expand Down Expand Up @@ -89,6 +65,30 @@ function createBaseLayers() {
world.push(createMapzenLayer());
}

world.push(new ol.layer.Tile({
source: new ol.source.OSM(),
name: 'osm',
title: 'OpenStreetMap',
type: 'base',
}));

// ------------------------------------------------------------
// AKISSACK - DEFAULT MAPS ------------------- ref: AK2A starts
// ------------------------------------------------------------
if (ShowAdditionalMaps) {
world.push(new ol.layer.Tile({
source: new ol.source.OSM({
"url" : "http://{a-c}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png"
}),
name: 'osm light',
title: 'OpenStreetMap Light',
type: 'base',
}));
}
// ------------------------------------------------------------
// ---------------------------------------------- ref: AK2A ends
// ------------------------------------------------------------

// ------------------------------------------------------------
// AKISSACK - US Layers ---------------------- ref: AK3A starts
// ------------------------------------------------------------
Expand Down
32 changes: 17 additions & 15 deletions public_html/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ function processReceiverUpdate(data) {
evt.stopPropagation();
return;
}

if (!$("#map_container").is(":visible")) {
showMap();
}
Expand Down Expand Up @@ -726,7 +725,7 @@ function initialize_map() {
});

var airportLayer = new ol.layer.Vector({
name: "airways",
name: "airports",
type: "overlay",
title: "Airports",
source: new ol.source.Vector({
Expand Down Expand Up @@ -769,13 +768,13 @@ function initialize_map() {
title: "UK",
layers: [
ukairspaceLayer,
airwaysLayer,
navPointsLayer,
airwaysMRCLayer,
airportLayer,
atzLayer,
ukCTALayer,
vordmeLayer,
navPointsLayer,
airwaysLayer,
ukCTALayer,
atzLayer,
airportLayer,
],
})
);
Expand Down Expand Up @@ -900,7 +899,7 @@ function initialize_map() {
layers.push(
new ol.layer.Group({
title: "UK Military",
layers: [matzLayer, matzafLayer, dangerLayer, ukmilLayer, AARLayer],
layers: [ukmilLayer,AARLayer,dangerLayer,matzLayer,matzafLayer],
})
);
}
Expand Down Expand Up @@ -1016,6 +1015,7 @@ function initialize_map() {
features: StaticFeatures,
}),
}),

new ol.layer.Vector({
name: "ac_trail",
type: "overlay",
Expand All @@ -1024,12 +1024,13 @@ function initialize_map() {
features: PlaneTrailFeatures,
}),
}),
SleafordRangeLayer, // Ref: AK8Y
iconsLayer,
rangeLayer,
maxRangeLayer, // Ref: AK8D
midRangeLayer, // Ref: AK8D
minRangeLayer, // Ref: AK8D
SleafordRangeLayer, // Ref: AK8Y
iconsLayer
midRangeLayer, // Ref: AK8D
maxRangeLayer, // Ref: AK8D

],
})
);
Expand Down Expand Up @@ -1900,8 +1901,7 @@ function refreshSelected() {
var emerg = document.getElementById("selected_emergency");
if (selected.squawk in SpecialSquawks) {
emerg.className = SpecialSquawks[selected.squawk].cssClass;
emerg.textContent =
NBSP + "Squawking: " + SpecialSquawks[selected.squawk].text + NBSP;
emerg.textContent = NBSP + "Squawking: " + SpecialSquawks[selected.squawk].text + NBSP;
} else {
emerg.className = "hidden";
}
Expand Down Expand Up @@ -2532,6 +2532,7 @@ function selectAllPlanes() {
// AKISSACK --------------- Ref: AK9G
function selectMilPlanes() {
// if mil planes are already selected, deselect them all
//console.log("mil "+SelectedMilPlanes);
if (SelectedMilPlanes) {
deselectMilPlanes();
} else {
Expand Down Expand Up @@ -2605,6 +2606,7 @@ function deselectAllPlanes() {
}
SelectedPlane = null;
SelectedAllPlanes = false;
deselectMilPlanes();
refreshSelected();
}

Expand Down Expand Up @@ -2799,7 +2801,7 @@ function setColumnVisibility() {
showColumn(infoTable, "#msgs", !mapIsVisible);
showColumn(infoTable, "#seen", !mapIsVisible);
showColumn(infoTable, "#vert_rate", !mapIsVisible);
showColumn(infoTable, "#rssi", !mapIsVisible);
showColumn(infoTable, "#rssi", !mapIsVisible);
showColumn(infoTable, "#lat", !mapIsVisible);
showColumn(infoTable, "#lon", !mapIsVisible);
showColumn(infoTable, "#data_source", !mapIsVisible);
Expand Down

0 comments on commit b9e3f08

Please sign in to comment.