r-spatial / mapview

Interactive viewing of spatial data in R
https://r-spatial.github.io/mapview/
GNU General Public License v3.0
518 stars 91 forks source link

mapviewOptions(platform = "mapdeck") #431

Open pdbentley opened 2 years ago

pdbentley commented 2 years ago

Hi,

Just came across this option, however havent been able to find a working example online. Tried the simple script below, however it results in rstudio crashing. Is the set for below as intended? If not a working example would be fab.

library(mapview) library(mapdeck) mapdeck::set_token('add_your_own') # add the key mapdeck() %>% add_polygon(data = franconia) # this works, used as a test mapviewOptions(platform = 'mapdeck') mapview(franconia) # this crashes rstudio

`R version 4.2.0 (2022-04-22 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22000)

Matrix products: default

locale: [1] LC_COLLATE=English_Australia.utf8 LC_CTYPE=English_Australia.utf8 LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C LC_TIME=English_Australia.utf8

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

other attached packages: [1] mapdeck_0.3.4 mapview_2.11.0.9000 RSQLite_2.2.14 raster_3.5-15 sp_1.5-0

loaded via a namespace (and not attached): [1] tidyselect_1.1.2 terra_1.5-34 purrr_0.3.4 sf_1.0-7 lattice_0.20-45 colorspace_2.0-3 jsonify_1.2.1 vctrs_0.4.1 generics_0.1.2 htmltools_0.5.2
[11] stats4_4.2.0 yaml_2.3.5 base64enc_0.1-3 utf8_1.2.2 blob_1.2.3 rlang_1.0.2 e1071_1.7-11 pillar_1.7.0 glue_1.6.2 DBI_1.1.3
[21] bit64_4.0.5 lifecycle_1.0.1 munsell_0.5.0 htmlwidgets_1.5.4 codetools_0.2-18 memoise_2.0.1 fastmap_1.1.0 crosstalk_1.2.0 class_7.3-20 fansi_1.0.3
[31] leafem_0.2.0 Rcpp_1.0.8.3 KernSmooth_2.23-20 scales_1.2.0 classInt_0.4-7 satellite_1.0.4 cachem_1.0.6 jsonlite_1.8.0 leaflet_2.1.1 webshot_0.5.3
[41] bit_4.0.4 png_0.1-7 digest_0.6.29 dplyr_1.0.9 grid_4.2.0 cli_3.3.0 tools_4.2.0 magrittr_2.0.3 proxy_0.4-27 tibble_3.1.7
[51] crayon_1.5.1 sfheaders_0.4.1 pkgconfig_2.0.3 ellipsis_0.3.2 R6_2.5.1 units_0.8-0 compiler_4.2.0 `

tim-salabim commented 2 years ago

I haven't tried the mapdeck option in a while. I'll investigate...