Skip to content
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

Empty map in viewer panel and in the browser #94

Closed
agila5 opened this issue Apr 10, 2024 · 1 comment
Closed

Empty map in viewer panel and in the browser #94

agila5 opened this issue Apr 10, 2024 · 1 comment

Comments

@agila5
Copy link

agila5 commented Apr 10, 2024

Dear all, I created this issue since when I try running the code in the documentation I get an empty plot, both in the Rstudio (Version 2023.12.1.402) Viewer panel and in the browser (Mozilla). For example, the following code chunk

library(leaflet)
library(leafgl)
library(sf)
  
storms = st_as_sf(atlStorms2005)
  
cols = heat.colors(nrow(storms))
  
leaflet() %>%
  addProviderTiles(provider = providers$CartoDB.Positron) %>%
  addGlPolylines(data = storms, color = cols, popup = TRUE, opacity = 1)

returns the following output:

image

If I check the Console (Viewer panel -> Right click -> Inspect Element -> Console), I get the following output

image

Do you have any suggestion what's the problem? Just in case, I also add the session info.

library(leaflet)
#> Warning: package 'leaflet' was built under R version 4.3.3
  library(leafgl)
#> Warning: package 'leafgl' was built under R version 4.3.3
  library(sf)
#> Linking to GEOS 3.11.2, GDAL 3.7.2, PROJ 9.3.0; sf_use_s2() is TRUE

Created on 2024-04-10 with reprex v2.0.2

Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.3.1 (2023-06-16 ucrt)
#>  os       Windows 11 x64 (build 22631)
#>  system   x86_64, mingw32
#>  ui       RTerm
#>  language (EN)
#>  collate  English_United Kingdom.utf8
#>  ctype    English_United Kingdom.utf8
#>  tz       Europe/Rome
#>  date     2024-04-10
#>  pandoc   3.1.1 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version date (UTC) lib source
#>  class         7.3-22  2023-05-03 [2] CRAN (R 4.3.1)
#>  classInt      0.4-10  2023-09-05 [1] CRAN (R 4.3.1)
#>  cli           3.6.1   2023-03-23 [1] CRAN (R 4.3.1)
#>  crosstalk     1.2.1   2023-11-23 [1] CRAN (R 4.3.3)
#>  DBI           1.2.2   2024-02-16 [1] CRAN (R 4.3.3)
#>  digest        0.6.35  2024-03-11 [1] CRAN (R 4.3.3)
#>  e1071         1.7-14  2023-12-06 [1] CRAN (R 4.3.2)
#>  evaluate      0.23    2023-11-01 [1] CRAN (R 4.3.3)
#>  fastmap       1.1.1   2023-02-24 [1] CRAN (R 4.3.1)
#>  fs            1.6.3   2023-07-20 [1] CRAN (R 4.3.1)
#>  glue          1.7.0   2024-01-09 [1] CRAN (R 4.3.2)
#>  htmltools     0.5.8.1 2024-04-04 [1] CRAN (R 4.3.3)
#>  htmlwidgets   1.6.4   2023-12-06 [1] CRAN (R 4.3.3)
#>  KernSmooth    2.23-21 2023-05-03 [2] CRAN (R 4.3.1)
#>  knitr         1.46    2024-04-06 [1] CRAN (R 4.3.3)
#>  leafgl      * 0.1.1   2020-06-28 [1] CRAN (R 4.3.3)
#>  leaflet     * 2.2.2   2024-03-26 [1] CRAN (R 4.3.3)
#>  lifecycle     1.0.4   2023-11-07 [1] CRAN (R 4.3.2)
#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.3.1)
#>  proxy         0.4-27  2022-06-09 [1] CRAN (R 4.3.1)
#>  purrr         1.0.2   2023-08-10 [1] CRAN (R 4.3.1)
#>  R.cache       0.16.0  2022-07-21 [1] CRAN (R 4.3.1)
#>  R.methodsS3   1.8.2   2022-06-13 [1] CRAN (R 4.3.1)
#>  R.oo          1.25.0  2022-06-12 [1] CRAN (R 4.3.1)
#>  R.utils       2.12.2  2022-11-11 [1] CRAN (R 4.3.1)
#>  R6            2.5.1   2021-08-19 [1] CRAN (R 4.3.1)
#>  Rcpp          1.0.12  2024-01-09 [1] CRAN (R 4.3.2)
#>  reprex        2.0.2   2022-08-17 [1] CRAN (R 4.3.1)
#>  rlang         1.1.3   2024-01-10 [1] CRAN (R 4.3.2)
#>  rmarkdown     2.26    2024-03-05 [1] CRAN (R 4.3.3)
#>  rstudioapi    0.15.0  2023-07-07 [1] CRAN (R 4.3.1)
#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.3.1)
#>  sf          * 1.0-16  2024-03-17 [1] Github (r-spatial/sf@67d41e4)
#>  styler        1.10.2  2023-08-29 [1] CRAN (R 4.3.1)
#>  units         0.8-5   2023-11-28 [1] CRAN (R 4.3.2)
#>  vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.3.2)
#>  withr         2.5.1   2023-09-26 [1] CRAN (R 4.3.1)
#>  xfun          0.43    2024-03-25 [1] CRAN (R 4.3.3)
#>  yaml          2.3.8   2023-12-11 [1] CRAN (R 4.3.2)
#> 
#>  [1] C:/Users/user/AppData/Local/R/win-library/4.3
#>  [2] C:/Program Files/R/R-4.3.1/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────
@agila5
Copy link
Author

agila5 commented Apr 10, 2024

Nevermind, it works perfectly with the github version of leafgl and leaflet. Sorry for bothering you...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant