Skip to content

Instantly share code, notes, and snippets.

@aagarw30
Created January 15, 2016 16:30
Show Gist options
  • Save aagarw30/fdbcf88ae0ccded69087 to your computer and use it in GitHub Desktop.
Save aagarw30/fdbcf88ae0ccded69087 to your computer and use it in GitHub Desktop.
R Shiny and Leaflet # 2 - Demo addTiles() function code snippet
library(shiny)
library(leaflet)
shinyServer(function(input, output) {
output$mymap <- renderLeaflet({
# define the leaflet map object
leaflet() %>%
addTiles() # this adds the base map tile - OSM (by default)
})
})
library(shiny)
library(leaflet)
shinyUI(fluidPage(
leafletOutput("mymap")
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment