remove dead code for rainvier clouds layer
This commit is contained in:
@@ -811,38 +811,6 @@ function createBaseLayers() {
|
||||
world.push(rainviewerRadar);
|
||||
}
|
||||
|
||||
if (false) {
|
||||
const rainviewerClouds = new ol.layer.Tile({
|
||||
name: 'rainviewer_clouds',
|
||||
title: 'RainViewer Clouds',
|
||||
type: 'overlay',
|
||||
opacity: rainViewerCloudsOpacity,
|
||||
visible: false,
|
||||
zIndex: 99,
|
||||
});
|
||||
g.refreshRainviewerClouds = async function() {
|
||||
const latestLayer = await g.getRainviewerLayers('satellite');
|
||||
const rainviewerCloudsSource = new ol.source.XYZ({
|
||||
url: 'https://tilecache.rainviewer.com/' + latestLayer.infrared[latestLayer.infrared.length - 1].path + '/512/{z}/{x}/{y}/0/0_0.png',
|
||||
attributions: '<a href="https://www.rainviewer.com/api.html" target="_blank">RainViewer.com</a>',
|
||||
attributionsCollapsible: false,
|
||||
maxZoom: 10,
|
||||
});
|
||||
rainviewerClouds.setSource(rainviewerCloudsSource);
|
||||
};
|
||||
|
||||
rainviewerClouds.on('change:visible', function(evt) {
|
||||
if (evt.target.getVisible()) {
|
||||
g.refreshRainviewerClouds();
|
||||
g.refreshRainviewerCloudsInterval = window.setInterval(g.refreshRainviewerClouds, 2 * 60 * 1000);
|
||||
} else {
|
||||
clearInterval(g.refreshRainviewerCloudsInterval);
|
||||
}
|
||||
});
|
||||
|
||||
world.push(rainviewerClouds);
|
||||
}
|
||||
|
||||
let createGeoJsonLayer = function (title, name, url, fill, stroke, showLabel = true) {
|
||||
return new ol.layer.Vector({
|
||||
type: 'overlay',
|
||||
|
||||
Reference in New Issue
Block a user