I'm trying to add a Leaflet map with tiles to a revealjs_presentation created in R. This map renders fine in ioslide or html format, but not in the revealjs_presentation format (main problems: all fonts are much too large and the map has strange artifacts around polygon boundaries when selected). Because the map works well in other output formats I suspect the issue has to do with some kind of CSS incompatability between revealjs_presentation and leaflet.
In order to isolate the two sets of code I saved the leaflet map using htmlwidgets. This map looks fine but it seems that there is no way to then embed this local html file within the presentation using, e.g., an iframe. As I'm not a CSS expert I'd appreciate any guidance on how to sort this out. If someone has produced an interactive leaflet map with popups that renders correctly in revealjs_presentation format within R I'd be grateful to see some part of that code. For what it's worth, the leaflet map code is:
leaflet(x) %>%
addPolygons(popup = popup, weight = 0.7, fillColor = ~pal(quintf),
color = 'white', fillOpacity = 1, opacity = 1,
smoothFactor = 0.8) %>%
addLegend(pal = pal, values = x$quintf, title = "CXI Activity",
position = 'bottom right')
This file saves correctly (e.g. the code below) but referencing it in an iframe breaks the self-contained nature of the knitted html file.
saveWidget(m, file="map.html")