Noodles484

Offline Workarounds

Discussion created by Noodles484 on Jan 27, 2012
Latest reply on Jan 30, 2012 by Noodles484
Hi,
    I'm using the wpf api on a research ship that has does not always have internet access.  Since it seems that the api doesn't have a way to check for connectivity built-in (as far as I know, please correct me if I am mistaken), I wanted to see if anyone thinks the following solution would work.

I was thinking of adding my map layers in xaml, naming them, but not setting the url in xaml.  Then, when the program starts up, it runs some function to determine whether or not we have internet connection.  If it returns true, then set the url in c#.  Since this is a pop-up window in my main application and not the main focus of the app, the mapping section is really just extra (although extremely helpful). 

Or is there a way to locally cache the areas we are in when we do have internet available.  If so, does this cache persist between sessions? 

If anyone has any thoughts on this or how to properly test for internet connection in c#, I'd appreciate it.

Thanks!

Outcomes