I've been trying to do a similar thing, but having difficulty with the cache functions. I rasied the question on another forum http://www.mapwindow.org/phorum/read.php?3,24728,24728#msg-24728 yesterday. Functions such as set_UseCache() don't seem to be members of MapWinGIS::Tiles.
Today I found this topic, and have also tried to use the Prefetch functions (specifically using PrefetchToFolder). I was equally unclear about the IStopExecution parameter. It was also unclear what the file extension was for - I found the code compiled using nullptr values for these parameters. To save the current view to a cache folder I've got (in VS2013 C++ using Windows Forms):
axMap1->Tiles->PrefetchToFolder(axMap1->GeographicExtents, axMap1->CurrentZoom, axMap1->Tiles->ProviderId, "C:\MapCache\", nullptr, nullptr);
Which doesn't crash or anything. It also doesn't create or write to the specified folder.
Alan
Today I found this topic, and have also tried to use the Prefetch functions (specifically using PrefetchToFolder). I was equally unclear about the IStopExecution parameter. It was also unclear what the file extension was for - I found the code compiled using nullptr values for these parameters. To save the current view to a cache folder I've got (in VS2013 C++ using Windows Forms):
axMap1->Tiles->PrefetchToFolder(axMap1->GeographicExtents, axMap1->CurrentZoom, axMap1->Tiles->ProviderId, "C:\MapCache\", nullptr, nullptr);
Which doesn't crash or anything. It also doesn't create or write to the specified folder.
Alan