Description
Hello, thanks for this package.
I'm experiencing issues using addGlPoints with L.CRS.Simple. My problem appears to be very similar to the one described in issue #13 , so before diving into my codes I would like to first replicate the working example, but the working example provided there does not render anything for me.
Below is the example code from issue #13
library(leafgl)
library(mapview)
library(leafem)
library(sf)
# Transform spatial data to CRS 3035
brew <- st_transform(breweries, 3035)
fran <- st_transform(st_cast(franconia, "POLYGON"), 3035)
trls <- st_transform(st_cast(trails, "LINESTRING"), 3035)
m <- leaflet(
options = leafletOptions(
minZoom = -1000,
crs = leafletCRS(crsClass = "L.CRS.Simple")
)
)
m %>%
addGlPoints(brew, popup = "founded") %>%
addGlPolygons(fran) %>%
addGlPolylines(trls) %>%
setView(lng = 4389376, lat = 2964480, zoom = -9) %>%
addMouseCoordinates()
I originally used the CRAN version and also tested the GitHub version, but neither was able to replicate the example.
sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.5 LTS
Matrix products: default
BLAS: /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.so; LAPACK version 3.11.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: America/New_York
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] sf_1.0-19 leafem_0.2.3 mapview_2.11.2 leafgl_0.2.2 leaflet_2.2.2
loaded via a namespace (and not attached):
[1] raster_3.6-31 htmlwidgets_1.6.4 devtools_2.4.5 remotes_2.5.0 processx_3.8.4 lattice_0.21-9 callr_3.7.6 ps_1.7.6
[9] vctrs_0.6.5 tools_4.3.2 crosstalk_1.2.1 stats4_4.3.2 curl_5.2.1 proxy_0.4-27 KernSmooth_2.23-22 satellite_1.0.5
[17] desc_1.4.3 lifecycle_1.0.4 compiler_4.3.2 munsell_0.5.1 terra_1.8-21 codetools_0.2-19 httpuv_1.6.15 htmltools_0.5.8.1
[25] usethis_2.2.3 class_7.3-22 later_1.3.2 jquerylib_0.1.4 urlchecker_1.0.1 ellipsis_0.3.2 classInt_0.4-11 cachem_1.1.0
[33] sessioninfo_1.2.2 mime_0.12 digest_0.6.37 purrr_1.0.2 fastmap_1.2.0 grid_4.3.2 jsonify_1.2.2 colorspace_2.1-1
[41] cli_3.6.4 magrittr_2.0.3 base64enc_0.1-3 pkgbuild_1.4.4 e1071_1.7-16 scales_1.3.0 promises_1.3.0 sp_2.2-0
[49] png_0.1-8 memoise_2.0.1 shiny_1.8.1.1 miniUI_0.1.1.1 profvis_0.4.0 rlang_1.1.5 Rcpp_1.0.14 xtable_1.8-4
[57] glue_1.8.0 DBI_1.2.3 geojsonsf_2.0.3 pkgload_1.3.4 rstudioapi_0.16.0 jsonlite_1.8.9 R6_2.6.0 fs_1.6.5
[65] units_0.8-5
Edit: fix the code block format issue