# WMS-T Updating

**URL:** <https://community.cesium.com/t/wms-t-updating/6948>\
**Category:** CesiumJS\
**Created:** [May 22, 2018, 3:41pm UTC](https://community.cesium.com/t/wms-t-updating/6948 "2018-05-22T15:41:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![f\_zap](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/f_zap/32/8028_2.png) [@f\_zap](https://community.cesium.com/u/f_zap)\
**Post date:** [May 22, 2018, 3:41pm UTC](https://community.cesium.com/t/wms-t-updating/6948/1 "2018-05-22T15:41:16Z")

</div>

**1. A concise explanation of the problem you’re experiencing.**

I’m using this code snippet that I found on the AGI github, but it only renders the 1st weather image. Am I doing something wrong, should I implement my own timer and do _something_ to update/re-render the provider?

**2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.**

var viewer = new Cesium.Viewer(‘cesiumContainer’);

function dataCallback(interval, index) {  
var time;  
if (index === 0) { // leading  
time = Cesium.JulianDate.toIso8601(interval.stop);  
} else {  
time = Cesium.JulianDate.toIso8601(interval.start);  
}

```
return {
    Time: time
};

```

}

var times = Cesium.TimeIntervalCollection.fromIso8601({  
iso8601: ‘2017-06-30/2018-05-21/P1D’,  
leadingInterval: true,  
trailingInterval: true,  
isStopIncluded: false, // We want stop time to be part of the trailing interval  
dataCallback: dataCallback  
});

var imageryLayers = viewer.imageryLayers;  
var provider = new Cesium.WebMapServiceImageryProvider({  
url: "[http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0q-t.cgi?"](http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0q-t.cgi?%22),  
layers: “nexrad-n0q-wmst”,  
parameters: {  
format: ‘image/png’,  
transparent: ‘true’  
},  
times: times,  
clock: viewer.clock  
});  
imageryLayers.addImageryProvider(provider);

provider.readyPromise  
.then(function() {  
var start = Cesium.JulianDate.fromIso8601(‘2017-06-30’);  
var end = Cesium.JulianDate.fromIso8601(‘2018-05-21’);

```
    viewer.timeline.zoomTo(start, end);

    var clock = viewer.clock;
    clock.startTime = start;
    clock.endTime = end;
    clock.currentTime = start;
    clock.clockRange = Cesium.ClockRange.LOOP_STOP;
    clock.multiplier = 10; // sped this up once everything rendered
});

```

**3. Context. Why do you need to do this? We might know a better way to accomplish your goal.**

My end goal is to use the geomet wms from Environment Canada who offer a composite all North America, which may be a long shot since they may not even offer WMS-T.

**4. The Cesium version you’re using, your operating system and browser.**

I’m using 1.45 on firefox.

Thanks!,

Ian

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [May 23, 2018, 2:15pm UTC](https://community.cesium.com/t/wms-t-updating/6948/2 "2018-05-23T14:15:06Z")

</div>

Hi Ian,

I see you are using **[WebMapServiceImageryProvider](https://cesiumjs.org/Cesium/Build/Documentation/WebMapServiceImageryProvider.html?classFilter=webmapser)**, but that class does not implement a timer to request new imagery. [**WebMapTileServiceImageryProvider**](https://cesiumjs.org/Cesium/Build/Documentation/WebMapTileServiceImageryProvider.html?classFilter=webma) is the class you should be using if you’d like to use WMS-T imagery. If you need something specific to your use case, I would suggest writing your own custom **ImageryProvider** using the source code of above two classes as an example.

Thanks,

Gabby
