I'm looking to reload the dimension values of a layer with OpenLayers 4.
My problem is when my App calls the GetCapabilities of the layer, the dimensions received are for a certain datetime, for example:
<Dimension name="time" units="ISO8601" default="2018-07-27T14:20:00Z" nearestValue="0">2018-07-27T11:20:00Z/2018-07-27T14:20:00Z/PT10M</Dimension>
but after a couple of hours, those datetime values are expired, so when I call the GetMap with these date parameters, the WMS tell me:
Invalid model run or date or timestamp value out of time domain : 2018-07-27T11:30:00Z/2018-07-27T14:30:00Z/PT10M
I try:
layer.getSources().refresh()
but it doesn't work. Is it something possible to do without delete/add the layer?