# How to use timeline widget with different WMS time steps

**URL:** <https://community.cesium.com/t/how-to-use-timeline-widget-with-different-wms-time-steps/1680>\
**Category:** CesiumJS\
**Created:** [November 15, 2014, 12:10am UTC](https://community.cesium.com/t/how-to-use-timeline-widget-with-different-wms-time-steps/1680 "2014-11-15T00:10:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Brockmann](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@Patrick\_Brockmann](https://community.cesium.com/u/Patrick_Brockmann)\
**Post date:** [November 15, 2014, 12:10am UTC](https://community.cesium.com/t/how-to-use-timeline-widget-with-different-wms-time-steps/1680/1 "2014-11-15T00:10:29Z")

</div>

Hi All,

I am discovering Cesium and its capacity to display WMS ressources  
with Cesium.WebMapServiceImageryProvider function.  
It works, tiles are dynamically request to the server then render by Cesium  
nicelly.

Now, how to manage the different time steps that are available from  
the WMS ressource ?

For example, here is an extract of the WMS capabilities from a ressource  
  
1984-01-16T12:00:00.000Z,1984-02-15T12:00:00.000Z,1984-03-16T12:00:00.000Z,…

Is there a way to configure the timeline widget with those different timesteps.

Let me know if this topic rings a bell to someone.

regards  
Patrick

---

<div class="post-metadata">

**Author:** ![Rch\_Rdwk](https://avatars.discourse-cdn.com/v4/letter/r/c5a1d2/32.png) [@Rch\_Rdwk](https://community.cesium.com/u/Rch_Rdwk)\
**Post date:** [June 1, 2015, 4:07pm UTC](https://community.cesium.com/t/how-to-use-timeline-widget-with-different-wms-time-steps/1680/2 "2015-06-01T16:07:47Z")

</div>

Hi,

I am facing the same issue!

Did you solve it? Or does anyone have an idea?

Thanks and regards,  
Richard

---

<div class="post-metadata">

**Author:** ![Michael\_Lodge-Paoli1](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Michael\_Lodge-Paoli1](https://community.cesium.com/u/Michael_Lodge-Paoli1)\
**Post date:** [June 1, 2015, 7:20pm UTC](https://community.cesium.com/t/how-to-use-timeline-widget-with-different-wms-time-steps/1680/3 "2015-06-01T19:20:30Z")

</div>

Support for this is on the long-term roadmap, but we have no specific timeframe.

I’m wondering if you could extend the WMS provider to handle the time parameter. From there you could define a callback method on the clock.tick to decide if the time variable on your custom wms provider should be updated.

You’ll want to be careful on how often you’re updating that variable and I’m not sure if you’ll have to call a refresh imagery to have Cesium detect it needs to refresh the layer’s tiles.

Might not be too bad, but I have not done it so my approach could be horribly off base. Kevin Ring, who wrote the original WMS provider might be able to provide some additional advice as well.

---

<div class="post-metadata">

**Author:** ![Berwyn\_McKilligan](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Berwyn\_McKilligan](https://community.cesium.com/u/Berwyn_McKilligan)\
**Post date:** [June 1, 2015, 10:14pm UTC](https://community.cesium.com/t/how-to-use-timeline-widget-with-different-wms-time-steps/1680/4 "2015-06-01T22:14:46Z")

</div>

Hi

I had to deal with something similar with custom json data and being able to select a time range and hide/show data based on a time range.

I rolled my own time time widget using

[http://ghusse.github.io/jQRangeSlider/](http://ghusse.github.io/jQRangeSlider/)

depending on your scenario you may want to look at something like a standard

jquery slider

or something like

> **[Timeline JS](http://timeline.knightlab.com/)**
>
> Easy-to-make, beautiful timelines.

or

[http://www.simile-widgets.org/timeline/](http://www.simile-widgets.org/timeline/)

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [June 2, 2015, 11:29pm UTC](https://community.cesium.com/t/how-to-use-timeline-widget-with-different-wms-time-steps/1680/5 "2015-06-02T23:29:44Z")

</div>

We have support for the WMS Time dimension in National Map / TerriaJS, using Cesium’s normal animation / timeline controls. It’s a pretty simple scheme, though. We create one WebMapServiceImageryProvider for the current time, and another for the next time with the layer’s alpha set to 0 (so it doesn’t show up). Once we hit the next time, we remove the first imagery provider, set the alpha of the second to whatever it should be, and create a new provider with alpha=0 for the next time. If you’re just playing forward at a moderate rate, it’s pretty smooth. If you jump around, there’s a bit of lag while the tiles download.

The code is here:

[https://github.com/TerriaJS/terriajs/blob/master/lib/Models/WebMapServiceCatalogItem.js](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/WebMapServiceCatalogItem.js)

With some of the important time-related functionality in the base class:

[https://github.com/TerriaJS/terriajs/blob/master/lib/Models/ImageryLayerCatalogItem.js](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/ImageryLayerCatalogItem.js)

Kevin
