-
Notifications
You must be signed in to change notification settings - Fork 123
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
Interactive maps in articles #989
Comments
I wouldn't trust what you see in the mapview pages right now. They're probably ancient, as the daily runs have been failing for quite some time now. The only thing I could imagine right from the top of my head is that mapview's knit_print is simply using the leaflet part (so relying on Posit to make sure things work). Regarding content, there's only one thing. I'd prefer if you used |
@olivroy do you have any idea how to fix this? Not only relevant for this vignette, but also for a tmap-basics vignette about switching modes. FYI: this is the last mapview commit that passed the automatic tests: https://github.com/r-spatial/mapview/tree/4202de2257214bd3c22b68fa8790e9596736fe83 |
Sorry for being unresponsive.. It seems very strange... I did some housekeeping in mapview to revive GitHub pages deployment r-spatial/mapview#497. And it seems that the maps are correctly deployed on their site :/ Maybe tmap is doing too much with its |
Maybe there is some sort of token that is required ? I remember this from leaflet a couple months ago rstudio/leaflet#913 (comment) rstudio/leaflet#912 Maybe this is related? |
dev leafem didn't work.. It is probably an issue with tmap knit_print method.. leaflet doesn't provide a Maybe that if active. tmap should set the class to A leaflet map has class = |
Very strange indeed. Also strange that leaflet doesn't provide a |
I guess that's because a leaflet map is an |
Yes that's true. So what happens if we remove |
That would be great! |
Not successful yet. After removing the It boils down to this problem: print(tmap_leaflet(tm_shape(World) + tm_polygons())) to make it appear. However, in an Rmd file, this chunk: tmap_mode("view")
print(tmap_leaflet(tm_shape(World) + tm_polygons())) doesn't produce a map. This does work: library(leaflet)
leaflet() |> addTiles() |
(in addition) Does not work: tmap_mode("view")
tmap_leaflet(tm_shape(World) + tm_polygons()) Works: tmap_mode("view")
lf = tmap_leaflet(tm_shape(World) + tm_polygons())
lf |
Even printing Source: https://github.com/r-tmap/tmap/blob/master/vignettes/32_versus_mapview.Rmd as an attempt to workaround this issue. @olivroy @tim-salabim any other tricks up your sleeves? |
Not really, just noticed that the rmd headers between tmap and mapview are quite different... |
Okay, this was the issue. #1021 fixed that. pkgdown: as-is: TRUE was probably the problem. Also height / width / retina was incorrect for interactive maps... I will see if I didn't create new issues with the PR.. |
Interactive maps don't work yet... https://r-tmap.github.io/tmap/articles/32_versus_mapview.html
They do work in mapview: https://r-spatial.github.io/mapview/articles/mapview_01-basics.html
@tim-salabim I checked your rmd code, but couldn't find out what did the trick.
(Also check out the content, and let me know your thoughts)
The text was updated successfully, but these errors were encountered: