Andrew
Andrew

Reputation: 164

R Mapview and Leaflet render in quarto and shiny but not in Rstudio when with R 4.4.0

With the new update of R version 4.4.0, mapview and leaflet do not render in the viewer window of RStudio but do render when used in shiny applications or quarto documents.

These will preview fine in the source editor as previews and render in quarto output html:


title: "Testing Mapview & Leaflet" format: html

Mapview

library(mapview)
mapview(breweries)

Leaflet

library(leaflet)

leaflet(breweries)%>%
  addTiles()%>%
  addCircleMarkers()

These do not render anything in the viewer window

library(mapview)
library(leaflet)

# Basic mapview
mapview(breweries)

# fgb = false
mapviewOptions(fgb=FALSE)
mapview(breweries)

# Basic leaflet
leaflet(breweries)%>%
  addTiles()%>%
  addCircleMarkers()

Leaflet version: 2.2.2

Mapview Version: 2.11.2

sessionInfo() R version 4.4.0 (2024-04-24 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 11 x64 (build 22621)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C LC_TIME=English_United States.utf8

time zone: America/New_York tzcode source: internal

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

other attached packages: [1] leaflet_2.2.1 mapview_2.11.2 shiny_1.7.5

loaded via a namespace (and not attached): [1] xfun_0.40 bslib_0.5.1 raster_3.6-26 htmlwidgets_1.6.4 lattice_0.22-6
[6] leaflet.providers_2.0.0 vctrs_0.6.3 tools_4.4.0 crosstalk_1.2.1 generics_0.1.3
[11] stats4_4.4.0 tibble_3.2.1 proxy_0.4-27 fansi_1.0.3 pkgconfig_2.0.3
[16] KernSmooth_2.23-22 satellite_1.0.4 RColorBrewer_1.1-3 uuid_1.1-1 lifecycle_1.0.4
[21] compiler_4.4.0 textshaping_0.3.6 munsell_0.5.0 terra_1.7-65 codetools_0.2-20
[26] httpuv_1.6.6 htmltools_0.5.7 class_7.3-22 sass_0.4.7 later_1.3.0
[31] pillar_1.9.0 crayon_1.5.2 jquerylib_0.1.4 ellipsis_0.3.2 rsconnect_0.8.29
[36] classInt_0.4-8 cachem_1.0.6 mime_0.12 brew_1.0-10 tidyselect_1.2.0
[41] digest_0.6.30 sf_1.0-9 dplyr_1.1.2 fastmap_1.1.1 grid_4.4.0
[46] colorspace_2.0-3 cli_3.6.1 magrittr_2.0.3 base64enc_0.1-3 utf8_1.2.2
[51] leafem_0.2.0 e1071_1.7-12 withr_2.5.2 scales_1.3.0 promises_1.2.0.1
[56] sp_2.1-2 ragg_1.2.5 png_0.1-8 memoise_2.0.1 knitr_1.45
[61] rlang_1.1.1 Rcpp_1.0.12 leafpop_0.1.0 xtable_1.8-4 glue_1.6.2
[66] DBI_1.2.1 svglite_2.1.3 rstudioapi_0.15.0 jsonlite_1.8.5 R6_2.5.1
[71] systemfonts_1.0.4 units_0.8-0

Upvotes: 0

Views: 208

Answers (0)

Related Questions