R mapshot cannot create self-contained html

1.1k views Asked by At

When I try to produce a self-contained html mapshot from the mapview package, it saves a separate folder with files, nevertheless. Also, it produces an error 99 which I could not get solved (but it still produces a working html).

Here a reproducible example:

library(mapview)
m = mapview(breweries)
m
## create standalone .html
mapshot(m, url = paste0(getwd(), "/map.html"), selfcontained = TRUE)

This gives me a nice html, but it is not self-contained. I get an html file and a folder called "map_files" that carries subfolders with js-files. Also it gives out the following error:

File map_files/PopupTable-0.0.1/popup.css not found in resource path
Error: pandoc document conversion failed with error 99

My session info:

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 
 
locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] mapview_2.9.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5              RColorBrewer_1.1-2      compiler_4.0.3         
 [4] pillar_1.4.6            base64enc_0.1-3         class_7.3-17           
 [7] tools_4.0.3             uuid_0.1-4              digest_0.6.27          
[10] jsonlite_1.7.1          lubridate_1.7.9         satellite_1.0.2        
[13] lifecycle_0.2.0         tibble_3.0.4            lattice_0.20-41        
[16] pkgconfig_2.0.3         png_0.1-7               rlang_0.4.8            
[19] DBI_1.1.0               rstudioapi_0.11         crosstalk_1.1.0.1      
[22] yaml_2.2.1              e1071_1.7-4             dplyr_1.0.2            
[25] raster_3.3-13           leaflet.providers_1.9.0 systemfonts_0.3.2      
[28] gdtools_0.2.2           generics_0.1.0          htmlwidgets_1.5.2      
[31] vctrs_0.3.4             webshot_0.5.2           tidyselect_1.1.0       
[34] stats4_4.0.3            classInt_0.4-3          leaflet_2.0.3          
[37] grid_4.0.3              svglite_1.2.3.2         glue_1.4.2             
[40] sf_0.9-6                R6_2.5.0                leafpop_0.0.6          
[43] sp_1.4-4                purrr_0.3.4             magrittr_1.5           
[46] scales_1.1.1            codetools_0.2-16        htmltools_0.5.0        
[49] ellipsis_0.3.1          units_0.6-6             colorspace_1.4-1       
[52] brew_1.0-6              KernSmooth_2.23-17      munsell_0.5.0          
[55] leafem_0.1.3            crayon_1.3.4    
0

There are 0 answers