AnsweredAssumed Answered

WMS Layers Not Refreshing with Caching Disabled

Question asked by chagan02 on Jul 8, 2014
Latest reply on Jul 22, 2014 by greenlaw

All,

 

I have a series of WMS layers that I'm pulling in from NOAA's NowCoast.  All is well except when trying to refresh the layers.  I have the page setup to auto refresh, and also to refresh using an onClick button.  When I click the button (after waiting sufficient time for the image to be updated on the parent server), nothing happens.  However, as soon as I pan or zoom the map, it refreshes.  So did some searching and found an old thread that suggested including map.setExtent(map.extent) in the refresh function.  So I did this, which is what actually makes the map refresh on pan/zoom I believe, without that, it wouldn't even refresh on pan/zoom.  Thus, I am still not getting what I want.  Can anyone help me out?

 




function RefreshWMSLayers(){
wmsRadarLayer.refresh();
wmsWarnLayer.refresh();
wmsGOESVISLayer.refresh();
wmsGOESIRLayer.refresh();
wmsOBSLayer.refresh();
wmsTempLayer.refresh();
wmsSSTLayer.refresh();
}
function AutoRefreshMap(){
dts = getDateTime();
console.log("Auto Refreshing at " + dts);
document.getElementById('DTS').textContent = dts;
RefreshWMSLayers();
map.setExtent(map.extent);

 

function RefreshMap(){
dts = getDateTime();
console.log("On Demand Refreshing at " + dts);
document.getElementById('DTS').textContent = dts; 
RefreshWMSLayers();
map.setExtent(map.extent);

 

}

Outcomes