I believe I've stumbled upon a couple of possibly inter-related issues with the caching code.
First, if I set something like the following:
basemap_ggplot(ext=ext,map_service='esri',map_type='world_imagery',verbose=TRUE, map_dir=file.path(.wd,'mymaps'))
png files are correctly placed in the mymaps
folder. However, a file like mymapsbasemap_20220829115215.tif
is placed in my working directory. Is this also supposed to be placed in the mymaps
directory? If so, I think the culprit is here:
Perhaps you meant do so something like file.path(map_dir, ...)
instead of paste0(map_dir,...)
?
Secondly, the basemap_* function throws an error message if you change the cache within the session. If I executed the code above, then execute (changing mymaps to mytiles):
basemap_ggplot(ext=ext,map_service='esri',map_type='world_imagery',verbose=TRUE, map_dir=file.path(.wd,'mytiles'))
I receive the error message
Error in cached[[which(cached.match)]]$file_comp : $ operator is invalid for atomic vectors
It seems to come from here:
cached[[which(cached.match)]]$file_compRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4