I am trying to add a leaflet map with tiles to the drop-down view created in R. This map is perfectly displayed in ioslide or html format, but not in opensjs_presentation format (main problems: all fonts are too large and the map has strange artifacts around the borders of the polygon when choosing). Since the map works well in other output formats, I suspect that the problem is due to some CSS incompatibility between showjs_presentation and leaflets.
To isolate the two sets of code, I saved the booklet map using htmlwidgets. This map looks great, but it seems impossible to embed this local html file in the presentation using, for example, iframe. Since I am not a CSS expert, I would appreciate any guidance on sorting it. If someone created an interactive map of booklets with pop-ups that display correctly in opensjs_presentation format in R, I would appreciate some parts of this code. What does it cost, booklet card code:
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 is saved correctly (for example, the code below), but the link to it in the iframe violates the autonomous nature of the associated html file.
saveWidget(m, file="map.html")
Derek darves
source share