And, an update.
I've found that the PrefetchToFolder() function creates a set of subfolders for whatever zoom level I wish, but does not generate a .db3 file to go with them. On the other hand, the Prefetch() function creates a .db3 file but no other files or folders, and the .db3 file cannot possibly be big enough to hold all the map data (it's less than 10KB). The DiskCacheFilename property is for an SQL file. I have been using both functions (first the PrefetchToFolder() to generate the folder full of data, then the Prefetch() to create the SQL file), but this doesn't seem to be the way to do things.
I have also sorted out the syntax for the UseCache() function within CLI::C++ in VisualStudio.
Instead of: Tiles->set_UseCache(tkCacheType::Disk, true);
I use: Tiles->UseCache::set(tkCacheType::Disk, true);
Which now compiles without a syntax error. I read somewhere that Microsoft have arbitrarily decided that the 'set_Function()' syntax has a particular meaning.
So, I now create a C:\MapCache\ folder, with sets of subfolders at different zoom levels and a MapCache.db3 file using two related functions, and I'm not sure this is right. I then copy that folder to the same location on my tablet which is offline, where my main program sets the cache file name to C:MapCache\MapCache.db3 and sets the UseCache property to Disk cachetype (as above). However, that program then fails to access the cached files, and I get no map display.
So, some small steps forward, but still failing to get where I want to be.
I've found that the PrefetchToFolder() function creates a set of subfolders for whatever zoom level I wish, but does not generate a .db3 file to go with them. On the other hand, the Prefetch() function creates a .db3 file but no other files or folders, and the .db3 file cannot possibly be big enough to hold all the map data (it's less than 10KB). The DiskCacheFilename property is for an SQL file. I have been using both functions (first the PrefetchToFolder() to generate the folder full of data, then the Prefetch() to create the SQL file), but this doesn't seem to be the way to do things.
I have also sorted out the syntax for the UseCache() function within CLI::C++ in VisualStudio.
Instead of: Tiles->set_UseCache(tkCacheType::Disk, true);
I use: Tiles->UseCache::set(tkCacheType::Disk, true);
Which now compiles without a syntax error. I read somewhere that Microsoft have arbitrarily decided that the 'set_Function()' syntax has a particular meaning.
So, I now create a C:\MapCache\ folder, with sets of subfolders at different zoom levels and a MapCache.db3 file using two related functions, and I'm not sure this is right. I then copy that folder to the same location on my tablet which is offline, where my main program sets the cache file name to C:MapCache\MapCache.db3 and sets the UseCache property to Disk cachetype (as above). However, that program then fails to access the cached files, and I get no map display.
So, some small steps forward, but still failing to get where I want to be.