In previous version of MSS, I was able to refresh a WmsOverlay by attaching a ‘Timestamp’ attribute, changing the time when I needed to refresh, and calling MyOverlay.Refresh() as suggested in this thread. I’ve been attempting to upgrade the version (from v5 to either v6 or v7) and that method no longer seems to work. I can’t figure out any method to accomplish this, actually. I’ve tried all manner of combinations of removing and adding the overlay, refreshes on both the overlay and map, and a handful of other things, but I can’t seem to get it working correctly again. Might you be able to shed some light on the situation? Thanks very much
Refreshing WMS Overlay
That’s strange, I compare the code, we nearly haven’t changed uri build logic, so it should works just like V5.
For now the only possible problem is I found in link contains a “&&” but it should be “&”. I modified it and please try today’s development version 184.108.40.206, then please let me know whether it’s the problem.
The other different place is, if your set VERSION parameter as 1.3.x, we will use CRS parameter and for other version we use SRS parameter.
If problem still exist, a simple sample contains your currently how to use WMSoverlay should be helpful.
I believe the problem exists before the link, as the connector isn’t even firing off a new HTTP request for the overlay refresh. If I move the map, zoom in or out, the map fires off the request for new tiles as usual, but does not on the .Refresh() method as it used to. The requests used after I have updated the timestamp do include the new timestamp as well, so it the URL is getting updated, it’s just not firing off on a ‘refresh’. I’ve included a snipet below to show what’s going on. This is still on 220.127.116.11, I will download 18.104.22.168 as soon as it’s available. Thanks for your help.
private void Page_Loaded(object sender, RoutedEventArgs e)
WmsOverlay MyOverlay = new WmsOverlay(“NEXRAD Weather”, new Uri("myurl.com/WmsServer.aspx?", UriKind.Absolute), TileType.MultipleTile);
MyOverlay.TransitionEffect = TransitionEffect.None;
DispatcherTimer timer = new DispatcherTimer();
timer.Interval = new TimeSpan(0, 0, 30);
timer.Tick += new EventHandler(timer_Tick);
void timer_Tick(object sender, EventArgs e)
var oldLayer = Map1.Overlays[“NEXRAD Weather”] as WmsOverlay;
if (oldLayer != null)
oldLayer.Parameters[“TIMESTAMP”] = DateTime.UtcNow.Ticks.ToString();
We added a api for this functionality, Would you please get the latest version (22.214.171.124) then set WmsOverlay.IsPreImageDisabled=True.Now it should work.
Hope it helps
Works perfectly! Thank you so much!
Great to hear it helped, if you have any more question, please feel free to let us know.