-
Notifications
You must be signed in to change notification settings - Fork 41
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
Can't interact with map after removing a layer #286
Comments
Already tested shiny 1.4.0, error remains. Will check an older dev snapshot of mapdeck. Best, |
v0.3.0 has the same problem |
Ok good news, v.0.2.1 is working. Best, |
I can reproduce this bug. Not sure what causes it but by the sounds of comments from @steffenaxer above it's a regression. Definitely a bug compared with the expected behavior. I'm not 100% sure this is an issue with Describe the bug The map here is frozen for me on Firefox and Chrome (I cannot pan or drag it): https://saferactive.github.io/ To Reproduce Click on the link above and try interacting with the map. It may work on some browsers, will be interesting to know. Another way to reproduce the issue, using a locally installed version of mapdeck, is to execute the following command in an R console: shiny::runUrl("https://github.com/saferactive/saferactive.github.io/releases/download/0.0.1/shinyapp1.zip") That also downloads the source code and some sample data. Expected behaviour I expect to be able to interact with the map on all browsers. Screenshots Versions packageVersion("mapdeck")
#> [1] '0.3.1001' Created on 2020-04-04 by the reprex package (v0.3.0) |
Here's my system info FYI: Session infodevtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 3.6.3 (2020-02-29)
#> os Ubuntu 18.04.4 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_GB:en
#> collate en_GB.UTF-8
#> ctype en_GB.UTF-8
#> tz Europe/London
#> date 2020-04-04
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [2] CRAN (R 3.6.0)
#> backports 1.1.5 2019-10-02 [1] CRAN (R 3.6.1)
#> callr 3.4.2 2020-02-12 [1] CRAN (R 3.6.2)
#> cli 2.0.2 2020-02-28 [1] CRAN (R 3.6.2)
#> crayon 1.3.4 2017-09-16 [2] standard (@1.3.4)
#> desc 1.2.0 2018-05-01 [2] standard (@1.2.0)
#> devtools 2.2.2 2020-02-17 [1] CRAN (R 3.6.2)
#> digest 0.6.25 2020-02-23 [1] CRAN (R 3.6.2)
#> ellipsis 0.3.0 2019-09-20 [3] CRAN (R 3.6.1)
#> evaluate 0.14 2019-05-28 [2] CRAN (R 3.6.0)
#> fansi 0.4.1 2020-01-08 [1] CRAN (R 3.6.2)
#> fs 1.3.2 2020-03-05 [2] CRAN (R 3.6.3)
#> glue 1.3.2 2020-03-12 [2] CRAN (R 3.6.3)
#> highr 0.8 2019-03-20 [3] CRAN (R 3.5.3)
#> htmltools 0.4.0.9003 2020-03-25 [1] Github (rstudio/htmltools@1a35072)
#> knitr 1.28 2020-02-06 [1] CRAN (R 3.6.2)
#> magrittr 1.5 2014-11-22 [2] CRAN (R 3.5.2)
#> memoise 1.1.0 2017-04-21 [3] CRAN (R 3.5.0)
#> pkgbuild 1.0.6 2019-10-09 [2] CRAN (R 3.6.1)
#> pkgload 1.0.2 2018-10-29 [3] CRAN (R 3.5.1)
#> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 3.6.2)
#> processx 3.4.2 2020-02-09 [2] CRAN (R 3.6.2)
#> ps 1.3.2 2020-02-13 [1] CRAN (R 3.6.3)
#> R6 2.4.1 2019-11-12 [2] CRAN (R 3.6.1)
#> Rcpp 1.0.4 2020-03-17 [1] CRAN (R 3.6.3)
#> remotes 2.1.1 2020-02-15 [1] CRAN (R 3.6.2)
#> rlang 0.4.5.9000 2020-03-25 [1] Github (r-lib/rlang@a90b04b)
#> rmarkdown 2.1.1 2020-03-25 [1] Github (rstudio/rmarkdown@947b872)
#> rprojroot 1.3-2 2018-01-03 [2] CRAN (R 3.5.3)
#> sessioninfo 1.1.1 2018-11-05 [3] CRAN (R 3.5.1)
#> stringi 1.4.6 2020-02-17 [1] CRAN (R 3.6.2)
#> stringr 1.4.0 2019-02-10 [2] standard (@1.4.0)
#> testthat 2.3.2 2020-03-02 [1] CRAN (R 3.6.3)
#> usethis 1.5.1.9000 2020-03-27 [1] Github (r-lib/usethis@a2c118f)
#> withr 2.1.2 2018-03-15 [2] CRAN (R 3.5.3)
#> xfun 0.12 2020-01-13 [1] CRAN (R 3.6.2)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 3.6.2)
#>
#> [1] /home/robin/R/x86_64-pc-linux-gnu-library/3.6
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library |
Confirmed, fixes it for me. Reprex (uncomment the shiny command): remotes::install_github("symbolixau/mapdeck")
#> Using github PAT from envvar GITHUB_PAT
#> Skipping install of 'mapdeck' from a github remote, the SHA1 (ba8e434d) has not changed since last install.
#> Use `force = TRUE` to force installation
# shiny::runUrl("https://github.com/saferactive/saferactive.github.io/releases/download/0.0.1/shinyapp1.zip") Created on 2020-04-04 by the reprex package (v0.3.0) Session infodevtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 3.6.3 (2020-02-29)
#> os Ubuntu 18.04.4 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_GB:en
#> collate en_GB.UTF-8
#> ctype en_GB.UTF-8
#> tz Europe/London
#> date 2020-04-04
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [2] CRAN (R 3.6.0)
#> backports 1.1.5 2019-10-02 [1] CRAN (R 3.6.1)
#> callr 3.4.2 2020-02-12 [1] CRAN (R 3.6.2)
#> cli 2.0.2 2020-02-28 [1] CRAN (R 3.6.2)
#> crayon 1.3.4 2017-09-16 [2] standard (@1.3.4)
#> curl 4.3 2019-12-02 [2] CRAN (R 3.6.2)
#> desc 1.2.0 2018-05-01 [2] standard (@1.2.0)
#> devtools 2.2.2 2020-02-17 [1] CRAN (R 3.6.2)
#> digest 0.6.25 2020-02-23 [1] CRAN (R 3.6.2)
#> ellipsis 0.3.0 2019-09-20 [3] CRAN (R 3.6.1)
#> evaluate 0.14 2019-05-28 [2] CRAN (R 3.6.0)
#> fansi 0.4.1 2020-01-08 [1] CRAN (R 3.6.2)
#> fs 1.3.2 2020-03-05 [2] CRAN (R 3.6.3)
#> glue 1.3.2 2020-03-12 [2] CRAN (R 3.6.3)
#> highr 0.8 2019-03-20 [3] CRAN (R 3.5.3)
#> htmltools 0.4.0.9003 2020-04-04 [1] Github (rstudio/htmltools@3b7fb83)
#> knitr 1.28 2020-02-06 [1] CRAN (R 3.6.2)
#> magrittr 1.5 2014-11-22 [2] CRAN (R 3.5.2)
#> memoise 1.1.0 2017-04-21 [3] CRAN (R 3.5.0)
#> pkgbuild 1.0.6 2019-10-09 [2] CRAN (R 3.6.1)
#> pkgload 1.0.2 2018-10-29 [3] CRAN (R 3.5.1)
#> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 3.6.2)
#> processx 3.4.2 2020-02-09 [2] CRAN (R 3.6.2)
#> ps 1.3.2 2020-02-13 [1] CRAN (R 3.6.3)
#> R6 2.4.1 2019-11-12 [2] CRAN (R 3.6.1)
#> Rcpp 1.0.4 2020-03-17 [1] CRAN (R 3.6.3)
#> remotes 2.1.1 2020-02-15 [1] CRAN (R 3.6.2)
#> rlang 0.4.5.9000 2020-03-25 [1] Github (r-lib/rlang@a90b04b)
#> rmarkdown 2.1.1 2020-03-25 [1] Github (rstudio/rmarkdown@947b872)
#> rprojroot 1.3-2 2018-01-03 [2] CRAN (R 3.5.3)
#> sessioninfo 1.1.1 2018-11-05 [3] CRAN (R 3.5.1)
#> stringi 1.4.6 2020-02-17 [1] CRAN (R 3.6.2)
#> stringr 1.4.0 2019-02-10 [2] standard (@1.4.0)
#> testthat 2.3.2 2020-03-02 [1] CRAN (R 3.6.3)
#> usethis 1.5.1.9000 2020-03-27 [1] Github (r-lib/usethis@a2c118f)
#> withr 2.1.2 2018-03-15 [2] CRAN (R 3.5.3)
#> xfun 0.12 2020-01-13 [1] CRAN (R 3.6.2)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 3.6.2)
#>
#> [1] /home/robin/R/x86_64-pc-linux-gnu-library/3.6
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library |
Excellent; I'm going to push this version to CRAN because it's an important bug fix. |
Thx! v0.3.2 fixed this problem. I think you can close this issue. |
Great news, the interactive map on the website is now fixed now after reloading shiny server: https://saferactive.github.io/ One follow-on question: @dcooley are you happy for me to ask follow-on questions about mapdeck in shiny that may not be bugs if I provide reproducible examples? And if so where's the best forum? I can ask on this issue tracker and tag issues as 'Feature' or perhaps better 'Question' if that would be of use/interest. Context: we've been funded by the Department for Transport to develop a road safety web app and I'm looking to mapdeck/shiny for rapid prototyping, likely to be ported to a geoplumber-esque approach with help from @layik, once we have a good prototype UI that is fast to knock together for R programmers like me but which may not be the most performant, scalable or API-able approach. Many thanks in any case, what you've developed is already massively helping our work and I hope to further help development of mapdeck in the course of the 18 month SaferActive project. |
@Robinlovelace I've added a question github template so you can now ask a general question; I'm happy for you to open issues using this template.
That's great news. Looking forward to see what you come up with and will help where I can. |
After having removed a layer and re-added it again, I lost control of the map. Scrolling and zooming is not possible. You can reproduce this issue with your own example code:
https://symbolixau.github.io/mapdeck/articles/tips_tricks.html#update_view
Tested it in: Chrome and Firefox
Used latest dev version from: 04.04.2020
Best,
Steffen
The text was updated successfully, but these errors were encountered: