restrict overlay rendering to covered areas (reduce source load) (#137)
This commit is contained in:
parent
6e5f2595e0
commit
9e671a14e4
|
|
@ -149,12 +149,16 @@ function createBaseLayers() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var nexrad_bottomLeft = ol.proj.fromLonLat([-171.0,9.0]);
|
||||||
|
var nexrad_topRight = ol.proj.fromLonLat([-51.0,69.0]);
|
||||||
|
var nexrad_extent = [nexrad_bottomLeft[0], nexrad_bottomLeft[1], nexrad_topRight[0], nexrad_topRight[1]];
|
||||||
var nexrad = new ol.layer.Tile({
|
var nexrad = new ol.layer.Tile({
|
||||||
name: 'nexrad',
|
name: 'nexrad',
|
||||||
title: 'NEXRAD',
|
title: 'NEXRAD',
|
||||||
type: 'overlay',
|
type: 'overlay',
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
visible: false
|
visible: false,
|
||||||
|
extent: nexrad_extent,
|
||||||
});
|
});
|
||||||
us.push(nexrad);
|
us.push(nexrad);
|
||||||
|
|
||||||
|
|
@ -210,6 +214,9 @@ function createBaseLayers() {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var dwd_bottomLeft = ol.proj.fromLonLat([1.9,46.2]);
|
||||||
|
var dwd_topRight = ol.proj.fromLonLat([16.0,55.0]);
|
||||||
|
var dwd_extent = [dwd_bottomLeft[0], dwd_bottomLeft[1], dwd_topRight[0], dwd_topRight[1]];
|
||||||
var dwd = new ol.layer.Tile({
|
var dwd = new ol.layer.Tile({
|
||||||
source: new ol.source.TileWMS({
|
source: new ol.source.TileWMS({
|
||||||
url: 'https://maps.dwd.de/geoserver/wms',
|
url: 'https://maps.dwd.de/geoserver/wms',
|
||||||
|
|
@ -224,6 +231,7 @@ function createBaseLayers() {
|
||||||
visible: false,
|
visible: false,
|
||||||
zIndex: 99,
|
zIndex: 99,
|
||||||
maxZoom: 14,
|
maxZoom: 14,
|
||||||
|
exent: dwd_extent,
|
||||||
});
|
});
|
||||||
|
|
||||||
var refreshDwd = function () {
|
var refreshDwd = function () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue