Search code examples
openlayersgeoserverwmsopenlayers-6

OpenLayers 6 WCS time handling


I made this codepen to experiment with OpenLayers and a WCS layer. I understand there is no WCS support but I do manage to display it using an Image layer and an ImageWMS source since WCS is exposed using the same API as WMS. My question is this : Why is it that whgen I perform an .updateParams({ RANGESUBSET: 'B1995' } for example does my map object does not create a proper request like the initialization request which displays the data for the first step?


Solution

  • RANGESUBSET does not seem to be a valid parameter. You get the same result even if you omit it. Replacing it with TIME and removing the B from the years does show different images

    let subset = ['1951','1952','1953','1954','1955','1995','1996','2000','2001','2004']
    
    btn1.onclick = function () {
      map.getLayers().getArray()[1].getSource().updateParams({ TIME: subset[0] })
    };
    
    btn2.onclick = function () {
      map.getLayers().getArray()[1].getSource().updateParams({ TIME: subset[1] })
    };
    
    // etc.
    

    https://codepen.io/mike-000/pen/vYprZoy