Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
---
title: "Untitled"
output: html_document
runtime: shiny_prerendered
---
```{r}
library(leaflet)
leafletOutput("map")
```
```{r, context="server"}
output$map <- renderLeaflet({
addTiles(leaflet())
})
```
```{r, context="server"}
observe({
invalidateLater(500)
leafletProxy("map", session) %>%
addCircles(
rnorm(1, sd = 100),
rnorm(1, sd = 100),
layerId = "a"
)
})
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment