More changes

This commit is contained in:
LAX18 Development
2021-08-10 22:36:11 -04:00
parent 6888e8e1f3
commit b4e60f87cd
7 changed files with 33 additions and 8 deletions
-1
View File
@@ -220,7 +220,6 @@ div#sidebar_container {
.space {
padding-right: 20px;
padding-left: 20px;
padding-top: 0px;
padding-bottom: 0px;
margin: auto;
-1
View File
@@ -165,7 +165,6 @@ div#sidebar_container {
.space {
padding-right: 20px;
padding-left: 20px;
padding-top: 0px;
padding-bottom: 0px;
margin: auto;
+4
View File
@@ -197,6 +197,10 @@
onclick="toggleInternet()">
<i class="material-icons" id="internet_mode">router</i>
</button>
<button id="cesium_button" class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab"
onclick="toggleCesium()">
<i class="material-icons" id="cesium">language</i>
</button>
<button id="radar_button" class="mdl-button mdl-js-button mdl-js-ripple-effect nav-button"
onclick="openRadar()">
Radar
+2
View File
@@ -18,6 +18,8 @@ xhr.onreadystatechange = function() {
}
xhr.send();
var ol3d
var cesuim_active = false
var internet_mode = 0
var country_names = {}
+12 -3
View File
@@ -15,6 +15,7 @@ function createBaseLayers() {
name: 'osm',
title: 'Street View (OSM)',
type: 'base',
visible: true
}));
@@ -22,6 +23,7 @@ function createBaseLayers() {
name: 'bing',
title: 'Dark Street View (Bing)',
type: 'base',
visible: false,
source: new ol.source.BingMaps({
key: keys["Bing"],
imagerySet: 'CanvasDark',
@@ -37,13 +39,15 @@ function createBaseLayers() {
}),
name: 'satellite',
title: 'Satellite',
type: 'base'
type: 'base',
visible: false
}));
online.push(new ol.layer.Tile({
name: 'bingaerial',
title: 'Satellite with Labels (Bing)',
type: 'base',
visible: false,
source: new ol.source.BingMaps({
key: keys['Bing'],
imagerySet: 'AerialWithLabelsOnDemand',
@@ -73,7 +77,8 @@ function createBaseLayers() {
name: 'chartbundle_' + type,
title: chartbundleTypes[type],
type: 'base',
group: 'chartbundle'
group: 'chartbundle',
visible: false
}));
}
}
@@ -84,7 +89,8 @@ function createBaseLayers() {
}),
name: 'offline',
title: 'Offline Maps',
type: 'base'
type: 'base',
visible: false
}));
var nexrad = new ol.layer.Tile({
@@ -139,6 +145,7 @@ function createBaseLayers() {
layers.push(new ol.layer.Group({
name: 'Online Maps',
title: 'Worldwide Online Maps + Overlays',
fold: 'open',
layers: online
}));
}
@@ -146,6 +153,7 @@ function createBaseLayers() {
layers.push(new ol.layer.Group({
name: 'Online Aircraft Maps',
title: 'Online Aircraft Maps',
fold: 'close',
layers: aircraft
}));
}
@@ -154,6 +162,7 @@ function createBaseLayers() {
layers.push(new ol.layer.Group({
name: 'Offline Maps',
title: 'Offline Maps',
fold: 'close',
layers: offline
}));
}
+3 -3
View File
@@ -510,16 +510,16 @@ function initialize_map() {
controls: [new ol.control.Zoom(),
new ol.control.Rotate(),
new ol.control.Attribution({ collapsed: true }),
new ol.control.ScaleLine({ units: Metric ? "metric" : "nautical" })
new ol.control.ScaleLine({ units: Metric ? "metric" : "nautical" }),
new ol.control.FullScreen()
],
loadTilesWhileAnimating: true,
loadTilesWhileInteracting: true
});
var ol3d = new olcs.OLCesium({
ol3d = new olcs.OLCesium({
map: OLMap,
});
// ol3d.setEnabled(true);
var layerSwitcher = new LayerSwitcher({
reverse: false,
+12
View File
@@ -515,4 +515,16 @@ function hsl_col_perc(percent, start, end) {
// Return a CSS HSL string
return 'hsl(' + c + ', 100%, 50%)';
// hsl_col_perc(bed_percent, 0, 120)
}
function toggleCesium() {
if (cesuim_active) {
ol3d.setEnabled(false);
cesuim_active = false
document.getElementById("cesium").innerHTML = "language"
} else {
ol3d.setEnabled(true);
cesuim_active = true
document.getElementById("cesium").innerHTML = "map"
}
}