我正在使用 ioslides_presentation 进行演示,并正在使用 Leaflet 嵌入交互式地图。用于切换不同图层的白框有很多不必要的空白。在将输出设为 html_document 或仅在 R 控制台中显示地图时,这不是问题。使用 ioslides_presentation 时有没有办法减少框中的空白/减小框的大小?
---
title: "Leaflet in ioslides"
output:
ioslides_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Leaflet
```{r, echo=F, message=F, warning=F}
library(raster)
library(leaflet)
rwa_adm0 <- getData('GADM', country='RWA', level=0)
rwa_adm1 <- getData('GADM', country='RWA', level=1)
leaflet() %>%
addProviderTiles("OpenStreetMap") %>%
addPolygons(data=rwa_adm0, group="ADM 0") %>%
addPolygons(data=rwa_adm0, group="ADM 1") %>%
addLayersControl(overlayGroups = c("ADM 0", "ADM 1"),
options = layersControlOptions(collapsed = FALSE))
```
传单输出: