Files
tar1090/html/layers.js

569 lines
22 KiB
JavaScript
Raw Normal View History

// -*- mode: javascript; indent-tabs-mode: nil; c-basic-offset: 8 -*-
"use strict";
// Base layers configuration
// "url" : "https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"
// "url" : "http://{a-c}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png"
// "url" : "http://{a-c}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png"
// "url" : "https://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}"
// "url" : "https://korona.geog.uni-heidelberg.de/tiles/asterh/x={x}&y={y}&z={z}"
// "url" : "https://{a-c}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png"
// "url" : "http://{a-c}.tilessputnik.ru/tiles/kmt2/{z}/{x}/{y}.png"
// "url" : "https://{a-c}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png"
// "url" : "https://{a-c}.tile.openstreetmap.se/osm/{z}/{x}/{y}.png"
function createBaseLayers() {
let layers = new ol.Collection();
let layers_group = new ol.layer.Group({
layers: layers,
});
let world = new ol.Collection();
let us = new ol.Collection();
let europe = new ol.Collection();
2021-09-05 20:50:34 +02:00
if (loStore['customTiles'] != undefined) {
2022-05-28 19:35:27 +02:00
custom_layers.push(new ol.layer.Tile({
2020-02-08 20:32:04 +01:00
source: new ol.source.OSM({
2021-09-05 20:50:34 +02:00
"url" : loStore['customTiles'],
maxZoom: 15,
2020-02-08 20:32:04 +01:00
}),
name: 'custom_tiles',
title: 'Custom tiles',
type: 'base',
}));
}
/*
world.push(new ol.layer.Tile({
source: new ol.source.OSM({
"url" : "https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png"
}),
name: 'wikimedia',
title: 'OpenStreetMap Wikimedia',
type: 'base',
}));
*/
2022-04-16 06:39:18 +02:00
if (offlineMapDetail > 0) {
world.push(new ol.layer.Tile({
source: new ol.source.OSM({
"url" : "osm_tiles_offline/{z}/{x}/{y}.png",
attributionsCollapsible: false,
maxZoom: offlineMapDetail,
}),
name: 'osm_tiles_offline',
title: 'OpenStreetMap offline',
type: 'base',
}));
}
2020-02-29 17:51:42 +01:00
world.push(new ol.layer.Tile({
2021-04-27 20:49:50 +02:00
source: new ol.source.OSM({
"url" : "https://map.adsbexchange.com/mapproxy/tiles/1.0.0/osm/osm_grid/{z}/{x}/{y}.png",
attributionsCollapsible: false,
2021-05-19 16:46:15 +02:00
maxZoom: 16,
2021-04-24 21:47:35 +02:00
}),
2021-04-27 20:49:50 +02:00
name: 'osm_adsbx',
title: 'OpenStreetMap ADSBx',
2021-04-24 21:47:35 +02:00
type: 'base',
}));
world.push(new ol.layer.Tile({
source: new ol.source.OSM({
2021-04-27 20:49:50 +02:00
maxZoom: 17,
attributionsCollapsible: false,
}),
2021-04-27 20:49:50 +02:00
name: 'osm',
title: 'OpenStreetMap',
type: 'base',
}));
2022-04-29 02:23:50 +02:00
let basemap_id = "rastertiles/voyager";
world.push(new ol.layer.Tile({
source: new ol.source.OSM({
"url" : "https://{a-d}.basemaps.cartocdn.com/"+ basemap_id + "/{z}/{x}/{y}.png",
"attributions" : 'Powered by <a href="https://carto.com">CARTO.com</a>'
+ ' using data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
attributionsCollapsible: false,
maxZoom: 15,
}),
name: "carto_" + basemap_id,
title: 'CARTO.com English',
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,
}),
2022-03-19 15:30:59 +01:00
name: 'osm_de',
title: 'OpenStreetMap DE',
type: 'base',
}));
}
2022-06-07 19:45:22 +02:00
if (false && adsbexchange) {
2022-04-29 00:21:24 +02:00
world.push(new ol.layer.Tile({
source: new ol.source.XYZ({
2022-06-07 19:45:22 +02:00
url: "https://api.maptiler.com/tiles/satellite-v2/{z}/{x}/{y}.jpg?key=HyIQ6A88uTDdX4n4MNVY",
2022-04-29 00:21:24 +02:00
attributions: '<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>',
attributionsCollapsible: false,
2022-06-07 19:45:22 +02:00
maxZoom: 19,
2022-04-29 00:21:24 +02:00
}),
2022-06-07 19:45:22 +02:00
name: 'maptiler_sat',
title: 'Satellite (Premium)',
2022-04-29 00:21:24 +02:00
type: 'base',
}));
2022-04-27 19:52:04 +02:00
world.push(new ol.layer.Tile({
source: new ol.source.XYZ({
2022-06-07 19:45:22 +02:00
url: "https://api.maptiler.com/maps/hybrid/256/{z}/{x}/{y}.jpg?key=HyIQ6A88uTDdX4n4MNVY",
2022-04-27 19:52:04 +02:00
attributions: '<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>',
attributionsCollapsible: false,
2022-06-07 19:45:22 +02:00
maxZoom: 19,
2022-04-27 19:52:04 +02:00
}),
2022-06-07 19:45:22 +02:00
name: 'maptiler_hybrid',
title: 'Hybrid Sat. (Premium)',
2022-04-27 19:52:04 +02:00
type: 'base',
}));
2022-04-27 20:03:22 +02:00
world.push(new ol.layer.Tile({
source: new ol.source.XYZ({
2022-06-07 19:45:22 +02:00
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">&copy; MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>',
attributionsCollapsible: false,
maxZoom: 19,
}),
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",
2022-04-27 20:03:22 +02:00
attributions: '<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>',
attributionsCollapsible: false,
2022-05-07 08:22:14 +02:00
maxZoom: 16,
2022-04-27 20:03:22 +02:00
}),
2022-06-07 19:45:22 +02:00
name: 'maptiler_english',
title: 'English MapTiler (testing)',
2022-04-27 20:03:22 +02:00
type: 'base',
}));
2022-04-27 19:52:04 +02:00
}
2022-04-21 20:48:08 +02:00
if (!adsbexchange) {
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}",
attributions: 'Powered by <a href="https://www.esri.com">Esri.com</a>' +
'— Sources: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
attributionsCollapsible: false,
maxZoom: 17,
}),
name: 'esri',
title: 'ESRI.com Sat.',
type: 'base',
}));
world.push(new ol.layer.Tile({
source: new ol.source.XYZ({
url: "https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",
attributions: 'Powered by <a href="https://www.esri.com">Esri.com</a>' +
'— Sources: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
attributionsCollapsible: false,
maxZoom: 16,
}),
name: 'esri_gray',
title: 'ESRI.com Gray',
type: 'base',
}));
world.push(new ol.layer.Tile({
source: new ol.source.XYZ({
url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",
attributions: 'Powered by <a href="https://www.esri.com">Esri.com</a>' +
'— Sources: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
attributionsCollapsible: false,
maxZoom: 17,
}),
name: 'esri_streets',
title: 'ESRI.com Streets',
type: 'base',
}));
}
2021-04-27 20:49:50 +02:00
if (0) {
let vtlayer = new ol.layer.VectorTile({
source: new ol.source.VectorTile({
url: "http://test02.dev.adsbexchange.com/tiles/{z}/{x}/{y}.pbf",
2021-04-27 20:49:50 +02:00
format: new ol.format.MVT(),
maxZoom: 9,
2021-04-27 20:49:50 +02:00
}),
name: 'vtlayer',
title: 'TEST VECTOR',
2021-04-27 20:49:50 +02:00
type: 'base',
renderMode: 'image',
});
2021-05-28 07:32:37 +02:00
jQuery.ajax({
url: 'osm-liberty/style.json',
dataType: 'json',
layer: vtlayer,
cache: false,
}).done(function(glStyle) {
ol.mbApplyStyle(this.layer, glStyle, 'openmaptiles');
2021-04-27 20:49:50 +02:00
});
world.push(vtlayer);
}
2022-04-25 19:22:48 +02:00
world.push(new ol.layer.Tile({
source: new ol.source.OSM({
url: 'https://gibs-{a-c}.earthdata.nasa.gov/wmts/epsg3857/best/BlueMarble_ShadedRelief_Bathymetry/default/EPSG3857_500m/{z}/{y}/{x}.jpeg',
attributions: '<a href="https://terra.nasa.gov/about/terra-instruments/modis">MODIS Terra</a> ' +
+ 'Provided by NASA\'s Global Imagery Browse Services (GIBS), part of NASA\'s Earth Observing System Data and Information System (EOSDIS)',
maxZoom: 8,
}),
name: 'gibs_reliev',
title: 'GIBS Relief',
type: 'base',
}));
const date = new Date(Date.now() - 86400 * 1000);
const yesterday = date.getUTCFullYear() + '-' + (date.getUTCMonth() + 1).toString().padStart(2, '0') + '-' + date.getUTCDate().toString().padStart(2, '0');
world.push(new ol.layer.Tile({
source: new ol.source.OSM({
url: 'https://gibs-{a-c}.earthdata.nasa.gov/wmts/epsg3857/best/' +
'MODIS_Terra_CorrectedReflectance_TrueColor/default/' +
yesterday + '/' +
'GoogleMapsCompatible_Level9/{z}/{y}/{x}.jpg',
attributions: '<a href="https://terra.nasa.gov/about/terra-instruments/modis">MODIS Terra</a> ' +
yesterday + ' Provided by NASA\'s Global Imagery Browse Services (GIBS), part of NASA\'s Earth Observing System Data and Information System (EOSDIS)',
2021-04-27 20:49:50 +02:00
maxZoom: 9,
}),
2020-04-15 10:20:38 +02:00
name: 'gibs',
2022-04-25 19:22:48 +02:00
title: 'GIBS Clouds ' + yesterday,
type: 'base',
}));
// carto.com basemaps, see the following URLs for details on them:
// http://basemaps.cartocdn.com
// https://github.com/CartoDB/cartodb/wiki/BaseMaps-available
2022-04-29 02:23:50 +02:00
let basemaps = [ "dark_all", "dark_nolabels",
"light_all", "light_nolabels"
]
if (1) {
for (let i in basemaps) {
let basemap_id = basemaps[i];
world.push(new ol.layer.Tile({
source: new ol.source.OSM({
"url" : "https://{a-d}.basemaps.cartocdn.com/"+ basemap_id + "/{z}/{x}/{y}.png",
"attributions" : 'Powered by <a href="https://carto.com">CARTO.com</a>'
+ ' using data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
attributionsCollapsible: false,
maxZoom: 15,
}),
name: "carto_" + basemap_id,
2022-04-29 01:59:22 +02:00
title: 'CARTO.com ' + basemap_id,
type: 'base',
}));
}
}
2021-09-05 20:50:34 +02:00
if (loStore['bingKey'] != undefined)
BingMapsAPIKey = loStore['bingKey'];
if (BingMapsAPIKey) {
world.push(new ol.layer.Tile({
source: new ol.source.BingMaps({
key: BingMapsAPIKey,
imagerySet: 'Aerial'
}),
name: 'bing_aerial',
title: 'Bing Aerial',
type: 'base',
}));
world.push(new ol.layer.Tile({
source: new ol.source.BingMaps({
key: BingMapsAPIKey,
imagerySet: 'RoadOnDemand'
}),
name: 'bing_roads',
title: 'Bing Roads',
type: 'base',
}));
}
if (ChartBundleLayers) {
let chartbundleTypes = {
sec: "Sectional Charts",
2022-04-01 17:45:24 +02:00
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 chartbundleTypes) {
us.push(new ol.layer.Tile({
2022-04-01 17:45:24 +02:00
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',
2021-04-27 20:49:50 +02:00
attributions: 'Tiles courtesy of <a href="http://www.chartbundle.com/">ChartBundle</a>',
attributionsCollapsible: false,
2022-04-01 17:45:24 +02:00
maxZoom: 11,
}),
name: 'chartbundle_' + type,
title: chartbundleTypes[type],
type: 'base',
group: 'chartbundle'}));
}
chartbundleTypes = {
secgrids: "Sect. w/ SAR grid",
};
for (let type in chartbundleTypes) {
us.push(new ol.layer.Tile({
source: new ol.source.TileWMS({
url: 'https://wms.chartbundle.com/wms',
params: {LAYERS: type},
projection: 'EPSG:3857',
2021-04-27 20:49:50 +02:00
attributions: 'Tiles courtesy of <a href="http://www.chartbundle.com/">ChartBundle</a>',
attributionsCollapsible: false,
2021-04-27 20:49:50 +02:00
maxZoom: 12, // doesn't work for WMS
}),
name: 'chartbundle_' + type,
title: chartbundleTypes[type],
type: 'base',
group: 'chartbundle'}));
}
}
world.push(new ol.layer.Tile({
source: new ol.source.XYZ({
"url" : "https://map.adsbexchange.com/mapproxy/tiles/1.0.0/openaip/ul_grid/{z}/{x}/{y}.png",
"attributions" : "openAIP.net",
attributionsCollapsible: false,
2021-05-19 18:21:07 +02:00
maxZoom: 12,
}),
name: 'openaip',
title: 'openAIP TMS',
type: 'overlay',
opacity: 0.7,
visible: false,
zIndex: 99,
2021-05-19 18:21:07 +02:00
maxZoom: 13,
}));
if (tfrs) {
world.push(new ol.layer.Vector({
source: new ol.source.Vector({
url: 'tfrs.kml',
format: new ol.format.KML(),
}),
name: 'tfr',
title: 'TFRs',
type: 'overlay',
opacity: 0.7,
visible: true,
zIndex: 99,
}));
}
2020-11-12 20:09:36 +01:00
if (true) {
// nexrad and noaa stuff
const bottomLeft = ol.proj.fromLonLat([-171.0,9.0]);
const topRight = ol.proj.fromLonLat([-51.0,69.0]);
const extent = [bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]];
let nexrad = new ol.layer.Tile({
name: 'nexrad',
title: 'NEXRAD',
type: 'overlay',
opacity: 0.35,
visible: false,
zIndex: 99,
extent: extent,
});
let refreshNexrad = function() {
// re-build the source to force a refresh of the nexrad tiles
let now = new Date().getTime();
nexrad.setSource(new ol.source.XYZ({
url : 'https://mesonet{1-3}.agron.iastate.edu/cache/tile.py/1.0.0/nexrad-n0q-900913/{z}/{x}/{y}.png?_=' + now,
attributions: 'NEXRAD courtesy of <a href="https://mesonet.agron.iastate.edu/">IEM</a>',
attributionsCollapsible: false,
maxZoom: 8,
}));
};
refreshNexrad();
window.setInterval(refreshNexrad, 2 * 60 * 1000);
let noaaRadarSource = new ol.source.ImageWMS({
attributions: ['NOAA'],
attributionsCollapsible: false,
url: 'https://nowcoast.noaa.gov/arcgis/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/WMSServer',
params: {'LAYERS': '1'},
projection: 'EPSG:3857',
maxZoom: 10,
});
2020-12-30 03:12:17 +01:00
let noaaRadar = new ol.layer.Image({
title: 'NOAA Radar',
name: 'noaa_radar',
zIndex: 99,
type: 'overlay',
visible: false,
source: noaaRadarSource,
opacity: 0.35,
extent: extent,
});
us.push(nexrad);
us.push(noaaRadar);
}
2020-12-30 03:12:17 +01:00
2020-01-23 20:45:54 +01:00
if (enableDWD) {
const bottomLeft = ol.proj.fromLonLat([1.9,46.2]);
const topRight = ol.proj.fromLonLat([16.0,55.0]);
const extent = [bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]];
let dwd = new ol.layer.Tile({
2020-01-23 20:45:54 +01:00
source: new ol.source.TileWMS({
url: 'https://maps.dwd.de/geoserver/wms',
2022-03-18 22:31:15 +01:00
params: {LAYERS: dwdLayers, validtime: (new Date()).getTime()},
2020-01-23 20:45:54 +01:00
projection: 'EPSG:3857',
2021-04-27 20:49:50 +02:00
attributions: 'Deutscher Wetterdienst (DWD)',
attributionsCollapsible: false,
2021-04-27 20:49:50 +02:00
maxZoom: 8,
2020-01-23 20:45:54 +01:00
}),
name: 'radolan',
title: 'DWD RADOLAN',
type: 'overlay',
opacity: 0.3,
visible: false,
zIndex: 99,
extent: extent,
2020-01-23 20:45:54 +01:00
});
let refreshDwd = function () {
2020-01-23 20:45:54 +01:00
dwd.getSource().updateParams({"validtime": (new Date()).getTime()});
};
refreshDwd();
2021-04-27 20:49:50 +02:00
window.setInterval(refreshDwd, 2 * 60 * 1000);
europe.push(dwd);
2020-01-23 20:45:54 +01:00
}
let createGeoJsonLayer = function (title, name, url, fill, stroke, showLabel = true) {
2020-03-01 23:12:41 +00:00
return new ol.layer.Vector({
type: 'overlay',
title: title,
name: name,
zIndex: 99,
visible: false,
2020-03-01 23:12:41 +00:00
source: new ol.source.Vector({
url: url,
format: new ol.format.GeoJSON({
2021-04-27 20:49:50 +02:00
defaultDataProjection :'EPSG:4326',
2020-03-01 23:12:41 +00:00
projection: 'EPSG:3857'
})
}),
2021-04-27 20:49:50 +02:00
style: function style(feature) {
return new ol.style.Style({
2020-03-02 20:14:40 +01:00
fill: new ol.style.Fill({
color : fill
2020-03-02 20:14:40 +01:00
}),
stroke: new ol.style.Stroke({
color: stroke,
width: 1
}),
text: new ol.style.Text({
2020-03-09 23:31:04 +01:00
text: showLabel ? feature.get("name") : "",
overflow: OLMap.getView().getZoom() > 5,
scale: 1.25,
fill: new ol.style.Fill({
color: '#000000'
}),
stroke: new ol.style.Stroke({
color: '#FFFFFF',
width: 2
})
2020-03-02 20:14:40 +01:00
})
});
}
2020-03-01 23:12:41 +00:00
});
2020-03-02 20:14:40 +01:00
};
2020-03-01 23:12:41 +00:00
// Taken from https://github.com/alkissack/Dump1090-OpenLayers3-html
europe.push(createGeoJsonLayer('UK Radar Corridors', 'ukradarcorridors', 'geojson/UK_Mil_RC.geojson', 'rgba(22, 171, 22, 0.3)', 'rgba(22, 171, 22, 1)'));
2020-06-18 08:12:10 +02:00
europe.push(createGeoJsonLayer('UK A2A Refueling', 'uka2arefueling', 'geojson/UK_Mil_AAR_Zones.geojson', 'rgba(52, 50, 168, 0.3)', 'rgba(52, 50, 168, 1)'));
2020-03-09 23:31:04 +01:00
europe.push(createGeoJsonLayer('UK AWACS Orbits', 'uka2awacsorbits', 'geojson/UK_Mil_AWACS_Orbits.geojson', 'rgba(252, 186, 3, 0.3)', 'rgba(252, 186, 3, 1)', false));
2020-03-12 17:46:13 +01:00
us.push(createGeoJsonLayer('US A2A Refueling', 'usa2arefueling', 'geojson/US_A2A_refueling.geojson', 'rgba(52, 50, 168, 0.3)', 'rgba(52, 50, 168, 1)'));
us.push(createGeoJsonLayer('US ARTCC Boundaries', 'usartccboundaries', 'geojson/US_ARTCC_boundaries.geojson', 'rgba(255, 0, 255, 0.3)', 'rgba(255, 0, 255, 1)', false));
2022-04-06 21:20:38 +02:00
if (uk_advisory) {
europe.push(createGeoJsonLayer('uka_airports', 'uka_airports', 'geojson/uk_advisory/airports.geojson', 'rgba(255, 255, 255, 1)', 'rgba(255, 255, 255, 1)'));
europe.push(createGeoJsonLayer('uka_airspaces', 'uka_airspaces', 'geojson/uk_advisory/airspaces.geojson', 'rgba(0, 0, 0, 0.1)', 'rgba(0, 30, 255, 0.2)'));
//europe.push(createGeoJsonLayer('hotspots', 'hotspots', 'geojson/uk_advisory/hotspots.geojson', 'rgba(255, 255, 255, 1)', 'rgba(255, 255, 255, 1)'));
//europe.push(createGeoJsonLayer('navaids', 'navaids', 'geojson/uk_advisory/navaids.geojson', 'rgba(0, 0, 0, 1)', 'rgba(0, 0, 0, 1)'));
europe.push(createGeoJsonLayer('uka_runways', 'uka_runways', 'geojson/uk_advisory/runways.geojson', 'rgba(0, 0, 0, 0.5)', 'rgba(0, 0, 0, 0.5)'));
europe.push(createGeoJsonLayer('uka_shoreham', 'uka_shoreham', 'geojson/uk_advisory/shoreham.geojson', 'rgba(0, 0, 0, 0.5)', 'rgba(0, 0, 0, 0.5)'));
}
if (l3harris) {
2021-04-23 17:01:56 +02:00
let files = ['IFT_NAV_Routes.geojson','IFT_Training_Areas.geojson','USAFA_Training_Areas.geojson'];
for (let i in files) {
let name = files[i].split('.')[0];
us.push(createGeoJsonLayer(name, 'ift' + i, 'geojson/IFT/' + files[i], 'rgba(52, 50, 168, 0.3)', 'rgba(52, 50, 168, 1)'));
}
}
2022-05-28 19:35:27 +02:00
layers.push(new ol.layer.Group({
name: 'custom',
title: 'Custom',
layers: custom_layers,
}));
if (europe.getLength() > 0) {
layers.push(new ol.layer.Group({
name: 'europe',
title: 'Europe',
layers: new ol.Collection(europe.getArray().reverse()),
2021-10-29 21:14:01 +02:00
fold: 'open',
2020-02-08 20:32:04 +01:00
}));
}
if (us.getLength() > 0) {
layers.push(new ol.layer.Group({
name: 'us',
title: 'US',
layers: new ol.Collection(us.getArray().reverse()),
2021-10-29 21:14:01 +02:00
fold: 'open',
}));
}
2020-01-23 20:45:54 +01:00
if (world.getLength() > 0) {
layers.push(new ol.layer.Group({
name: 'world',
title: 'Worldwide',
layers: new ol.Collection(world.getArray().reverse()),
//fold: 'open',
2020-03-01 23:12:41 +00:00
}));
}
2020-02-29 17:51:42 +01:00
2020-01-23 20:45:54 +01:00
return layers_group;
}