-
Notifications
You must be signed in to change notification settings - Fork 29
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
pane option for addStarsImage #58
Comments
This is currently not possible because the underlying JS-method |
The |
fix: fixes #58 - expose option to addStarsImage
Still does not seem to be passed on correctly. Are you sure
(The related tmap issue r-tmap/tmap#882) |
Apparently you cannot append a layer to any of leaflets own panes. You will get a browser error like this
You have to create a pane frst with This code creates the map below and inside the HTML you can see that the pane exists and the layer is inside.
|
Thx @trafficonese This example doesn't work on my machine. It added the pane, but it still puts the stars image into the leaflet tile-pane. The new pane remains empty. In Safari inspector: library(stars)
#> Loading required package: abind
#> Loading required package: sf
#> Linking to GEOS 3.11.0, GDAL 3.5.3, PROJ 9.1.0; sf_use_s2() is TRUE library(leaflet)
library(leafem)
sessioninfo::session_info(pkgs = "attached")
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.3.1 (2023-06-16)
#> os macOS Sonoma 14.4.1
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Berlin
#> date 2024-06-11
#> pandoc 3.1.1 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> abind * 1.4-5 2016-07-21 [1] CRAN (R 4.3.0)
#> leafem * 0.2.3.9006 2024-06-11 [1] Github (r-spatial/leafem@541e2a6)
#> leaflet * 2.2.2 2024-03-26 [1] CRAN (R 4.3.1)
#> sf * 1.0-16 2024-03-24 [1] CRAN (R 4.3.1)
#> stars * 0.6-5 2024-01-15 [1] Github (r-spatial/stars@666abc7)
#>
#> [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#>
#> ────────────────────────────────────────────────────────────────────────────── Created on 2024-06-11 with reprex v2.1.0 |
I cannot reproduce this. It works in all my browsers also with your package versions.. The only difference is I'm using Windows an R 4.4.0 Patched.. but that should not be the issue.. |
Yes, with Maybe a similar issue to #77 (comment) ? Although it seems strange that this is related to the R version, it seems like it is the case... |
Just installed R 4.4.1. And this issue still persists... |
This works for me with R 4.4.1. Are you using the github version of leafem? |
Il it can help, I also encountered this problem; all worked fine after installing the github version of leafem (v. ‘0.2.3.9006’). This solved also r-tmap/tmap#882. Tested both on Windows and Ubuntu. |
Maybe I overlooked it, but there does not seem to be a pane option for addStarsImage?
The text was updated successfully, but these errors were encountered: