Skip to content

Instantly share code, notes, and snippets.

@aagarw30
Last active January 15, 2016 16:27
Show Gist options
  • Save aagarw30/d37b2fba646f0d65a513 to your computer and use it in GitHub Desktop.
Save aagarw30/d37b2fba646f0d65a513 to your computer and use it in GitHub Desktop.
R Shiny and Leaflet # 1 - Demo leaflet() function code snippet
library(shiny)
library(leaflet)
shinyServer(function(input, output) {
output$mymap <- renderLeaflet({
# define the leaflet map object
leaflet() # this will just define the map widget
})
})
library(shiny)
library(leaflet)
shinyUI(fluidPage(
leafletOutput("mymap") # empty map will show up as we defined only the map widget in server side but did not add the base map tile
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment