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

map features aren't showing up #96

Open
kmcd39 opened this issue Jun 21, 2024 · 1 comment
Open

map features aren't showing up #96

kmcd39 opened this issue Jun 21, 2024 · 1 comment

Comments

@kmcd39
Copy link

kmcd39 commented Jun 21, 2024

I was trying to apply to my use case and no polygons were showing up, so i tried with the basic example with the package readme, and no points showed up in that application either.

library(leaflet)
library(leafgl)
library(sf)

n = 1e6

df1 = data.frame(id = 1:n,
                 x = rnorm(n, 10, 3),
                 y = rnorm(n, 49, 1.8))

pts = st_as_sf(df1, coords = c("x", "y"), crs = 4326)

options(viewer = NULL) # view in browser

leaflet() %>%
  addProviderTiles(provider = providers$CartoDB.DarkMatter) %>%
  addGlPoints(data = pts, group = "pts") %>%
  setView(lng = 10.5, lat = 49.5, zoom = 6)

(The base tiles open in the browser, but the points don't render)
Screenshot 2024-06-21 094050

Session info:

R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default


locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
[5] 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] sf_1.0-16       lubridate_1.9.3 forcats_1.0.0   stringr_1.5.1   dplyr_1.1.4     purrr_1.0.2    
 [7] readr_2.1.5     tidyr_1.3.1     tibble_3.2.1    ggplot2_3.5.1   tidyverse_2.0.0 leafgl_0.1.1   
[13] leaflet_2.2.2  

loaded via a namespace (and not attached):
 [1] gtable_0.3.5            htmlwidgets_1.6.4       devtools_2.4.5          remotes_2.5.0          
 [5] lattice_0.22-6          tzdb_0.4.0              leaflet.providers_2.0.0 vctrs_0.6.5            
 [9] tools_4.4.1             crosstalk_1.2.1         generics_0.1.3          curl_5.2.1             
[13] proxy_0.4-27            fansi_1.0.6             pkgconfig_2.0.3         KernSmooth_2.23-24     
[17] lifecycle_1.0.4         compiler_4.4.1          munsell_0.5.1           httpuv_1.6.15          
[21] htmltools_0.5.8.1       usethis_2.2.3           class_7.3-22            jquerylib_0.1.4        
[25] later_1.3.2             pillar_1.9.0            urlchecker_1.0.1        ellipsis_0.3.2         
[29] classInt_0.4-10         cachem_1.1.0            sessioninfo_1.2.2       viridis_0.6.5          
[33] mime_0.12               tidyselect_1.2.1        digest_0.6.35           stringi_1.8.4          
[37] fastmap_1.2.0           grid_4.4.1              jsonify_1.2.2           colorspace_2.1-0       
[41] cli_3.6.2               magrittr_2.0.3          pkgbuild_1.4.4          utf8_1.2.4             
[45] e1071_1.7-14            withr_3.0.0             scales_1.3.0            promises_1.3.0         
[49] sp_2.1-4                timechange_0.3.0        gridExtra_2.3           hms_1.1.3              
[53] memoise_2.0.1           shiny_1.8.1.1           rmapshaper_0.5.0        rbenchmark_1.0.0       
[57] V8_4.4.2                miniUI_0.1.1.1          viridisLite_0.4.2       profvis_0.3.8          
[61] rlang_1.1.4             Rcpp_1.0.12             xtable_1.8-4            glue_1.7.0             
[65] DBI_1.2.3               pkgload_1.3.4           rstudioapi_0.16.0       jsonlite_1.8.8         
[69] R6_2.5.1                fs_1.6.4                units_0.8-5            
@tim-salabim
Copy link
Member

Can you try and see if it works with the development version from github? See e-g- #94

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

2 participants