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:


but it doesn't work. Is it something possible to do without delete/add the layer?

  • I try this too gis.stackexchange.com/questions/30680/… but it's for layer image not layer definition – Michael Jul 27 '18 at 18:22
  • I'm not sure I understand the issue, if you are saying that you do a GetMap request with a specific time parameter which you know expires; won't refresh just make the same request and fail (that seems correct). You'll need to regenerate the request with the new time values. – nmtoken Jul 27 '18 at 21:02
  • I need to call the getCapabilities again to get the "refreshed" time parameters from the WMS. With this "fresh" parameters, I will be able to call the getMap with correct parameters. If you want to take a look at the WMS: geo.weather.gc.ca/… – Michael Jul 30 '18 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.