Refresh Map

Jun 7, 2009 at 11:27 PM

Is there a way to refresh or redraw the map without restarting the entire silverlight app?

Coordinator
Jun 8, 2009 at 12:58 AM

If you change the Baselayer to something else and then back again it does seem to redraw every tile. However I suspect the tiles will come from your internet cache the 2nd time. If you're serving tiles that need to change often then you would also need to set their header to expire immediately.

Let me know what you're doing and maybe we can introduce a Refresh() method?

We do the opposite using an ASP.NET tilehandler, manually setting it to be 7 days:

            context.Response.Clear();
            context.Response.Cache.SetExpires(DateTime.Now.AddDays(7));
            context.Response.Cache.VaryByParams["key"] = true;

John.

Jun 8, 2009 at 1:12 AM

Basically, the map will draw coordinates from a database and based on certain selections of the user, the map should redraw data and refresh what is displayed on it. So depending on the click, it will remove or add layers as is seen fit. Thats the plan.

Jun 14, 2011 at 3:53 PM

 

Hello braniac22,
Have you found any solution for your question? I have the same problem. I would like to refresh the map when the user makes a selection. 
At this moment I obtain that result only if the user makes zoom into the map.
Thanks in advance,Mario