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

Leaflet markers do not show up with layout="l-screen-inset" #106

Closed
AndersFenger opened this issue Oct 5, 2019 · 5 comments
Closed

Leaflet markers do not show up with layout="l-screen-inset" #106

AndersFenger opened this issue Oct 5, 2019 · 5 comments
Labels
bug 🐛 Something isn't working

Comments

@AndersFenger
Copy link

When knitting a distill::distill_article with the following code in a chunk with chunk option layout="l-screen-inset" (or any other non-default layout argument) added markers are not seen on the map.

library(leaflet)
leaflet() %>%
  addTiles() %>%  # Add default OpenStreetMap map tiles
  addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")

The code is taken directly from the documentation https://rstudio.github.io/distill/figures.html#full-screen-layout. Note that the issue can already be observed from this documentation page where the marker of the birthplace of R is not seen.

@jarrodscott
Copy link

Any solution to this issue? I am encountering the same problem. Thanks!

@jarrodscott
Copy link

jarrodscott commented Aug 15, 2020

@AndersFenger
For what its worth I was able to get layout='l-screen-inset to work with addCircleMarkers instead of addMarkers.

leaflet() %>%
  addTiles() %>% 
  addCircleMarkers(lng = c(-82.334720, -82.131119), 
             lat = c(9.219640, 9.248433), radius = 25,
             popup = c("Label 1", "Label 2"),
             color = c("#141414", "#141414"), 
             fillColor = c("#D55E00", "#0072B2"), 
             stroke = TRUE, fillOpacity = 0.9, weight = 10)

@apreshill apreshill added the bug 🐛 Something isn't working label Sep 12, 2020
@rbcavanaugh
Copy link

rbcavanaugh commented Dec 27, 2021

Any chance there's an update on this? Would love to have full screen leaflet maps with markers.

Editing to add: Another odd wrinkle is that addMarkers seems to work fine if using clusterOptions = markerClusterOptions()

@cderv cderv closed this as completed in b45f7b0 May 4, 2022
@cderv
Copy link
Collaborator

cderv commented May 4, 2022

It took me a while to find what was happening. I think I found what was the problem. This should now be fixed in dev version of distill

Thanks a lot for your patience on this.

@cderv cderv moved this to Backlog in R Markdown Team Projects May 4, 2022
@cderv cderv moved this from Backlog to Done in R Markdown Team Projects May 4, 2022
@rbcavanaugh
Copy link

thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Archived in project
Development

No branches or pull requests

5 participants