我有下一个ol.layer.Image
:
let wmsLayer = new ol.layer.Image({
visible: true,
source: new ol.source.ImageWMS(/*params of the source*/),
minResolution: 0.2578032858762812,
maxResolution: 490.4640841686878
});
但是当地图分辨率等于图层maxResolution(490.4640841686878)时,图层不会显示。
如果地图分辨率严格小于maxResolution,我可以在line 85 of layer.js上看到该图层可见:
ol.layer.Layer.visibleAtResolution = function(layerState, resolution) {
return layerState.visible && resolution >= layerState.minResolution &&
resolution < layerState.maxResolution;
};
这种行为有什么原因吗?如果地图分辨率小于或等于而不是maxResolution会不会更好?