-
Notifications
You must be signed in to change notification settings - Fork 90
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
Using the "|" operator, the basemap is not rendered in knitted markdown #349
Comments
Thanks @felixhaass , this is a tough one. No idea why this doesn't work. Doesn't help that we don't see any errors in the browser console... Not sure how to fix this |
It seems that markdown is having problems with leaflet panes. The following example will show no basemap in a knitted document, but if you remove So I'm not so sure that the problem comes from
|
@trafficonese great catch! Any ideas how to resolve this? Sounds like a job for rstudio & leaflet... |
Unfortunately, I don't really have a lot of experience with markdown and the entire processing pipeline to figure out where this error actually shows up. But I'm going to dig into |
Well, I'd say that given that you've isolated the problem to be either leaflet or rmarkdown based, we should consider opening an issue with rstudio (probably leaflet). FWIW, this works library(leaflet)
leaflet() %>%
addMapPane("tile", zIndex = 0) %>%
addTiles(group = "base", layerId = "baseid", options = tileOptions(pane = "tile")) whereas this doesn't library(leaflet)
leaflet() %>%
addMapPane("right", zIndex = 0) %>%
addTiles(group = "base", layerId = "baseid", options = tileOptions(pane = "right")) I used |
FWIW I looked a bit into that as you opened an issue in rmarkdown. I believe this is something missingin Leaflet JS library. Not sure what could be done on our side, but if something, I would say it would be in leaflet R package by patching the CSS. |
We've decided to add the missing CSS in leaflet. Hopefully this is enough to help with your issue. |
Should work now with the dev version of leaflet rstudio/leaflet#770 |
First off, thanks for the terrific package! It has helped me a lot.
I've stumbled across the following minor bug. When I run
mapview(breweries) | mapview(franconia)
in an rmarkdown chunk that I subsequently knit to HTML, the basemaps are missing.Here's the code I've used:
This gives me the following output:
When I use
mapview(breweries) | mapview(franconia)
in RStudio, the Viewer Pane shows the correct basemap.I'm using
mapview
version2.9.4
.I tried to narrow down from where the problem originates, but no success. Any idea?
Thanks,
Felix
The text was updated successfully, but these errors were encountered: