All examples By author By category About

timelyportfolio

responsive? leaflet htmlwidget

Built with blockbuilder.org and htmlwidgets

In response to Stack Overflow post, I did this quick rmarkdown example. Here is the live example.

--- title: "responsive_leaflet" author: "TimelyPortfolio" date: "March 24, 2016" output: html_document: mathjax: null ---
```{r echo=FALSE, warning=FALSE}
# no help from a framework
#  just percentage height and width
library(leaflet)

l <- leaflet(width="100%") %>%
addTiles()
l
```

```{r echo=FALSE, warning=FALSE}
# demonstrate with Bootstrap
library(shiny)

fluidRow(
column(width=10,l)
)
```