make layer from DWD configurable

This commit is contained in:
Matthias Wirth
2022-03-18 22:31:15 +01:00
parent cd40292ccf
commit ecd398f90f
3 changed files with 5 additions and 1 deletions

View File

@@ -75,6 +75,9 @@
// default these overlays to on for visitors which haven't disabled them in the browser in a previous session
// defaultOverlays = ['radolan', 'nexrad'];
// change which product from DWD to use
// dwdLayers = 'dwd:RX-Produkt';
// Default map dim state, true or false.
// MapDim = true;
// mapDimPercentage = 0.45;

View File

@@ -58,6 +58,7 @@ let actual_range_outline_dash = null; // null - solid line, [5, 5] - dashed line
// which map is displayed to new visitors
let MapType_tar1090 = "osm_adsbx";
let defaultOverlays = [];
let dwdLayers = 'dwd:RX-Produkt';
// Default map dim state
let MapDim = true;

View File

@@ -348,7 +348,7 @@ function createBaseLayers() {
let dwd = new ol.layer.Tile({
source: new ol.source.TileWMS({
url: 'https://maps.dwd.de/geoserver/wms',
params: {LAYERS: 'dwd:RX-Produkt', validtime: (new Date()).getTime()},
params: {LAYERS: dwdLayers, validtime: (new Date()).getTime()},
projection: 'EPSG:3857',
attributions: 'Deutscher Wetterdienst (DWD)',
attributionsCollapsible: false,