New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues related to caching #11
Comments
Thanks, that is clearly a bug – fixed this with 545fc49.
I could not exactly reproduce this, however, changing Could you test whether the issue is solved with the most recent commits? |
Both fixes worked!
Validate that fix 545fc49 places the .tif file in map_dir
Validate that fix 21daaa5 does not throw an issue and does not attempt to load from cache if map_dir is changed
|
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 likemymapsbasemap_20220829115215.tif
is placed in my working directory. Is this also supposed to be placed in themymaps
directory? If so, I think the culprit is here:basemaps/R/internal.R
Line 150 in e86cd62
Perhaps you meant do so something like
file.path(map_dir, ...)
instead ofpaste0(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:
basemaps/R/internal.R
Line 148 in e86cd62
The text was updated successfully, but these errors were encountered: