Last active
January 23, 2016 08:05
-
-
Save aagarw30/77c51ead64d62964f941 to your computer and use it in GitHub Desktop.
R Shiny and Leaflet # 6 - Mapping my birth location - Demo addPopups() with minimal reproducible example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(leaflet) | |
shinyServer(function(input, output) { | |
output$mymap <- renderLeaflet({ | |
# define the leaflet map object | |
leaflet() %>% | |
addTiles() %>% | |
setView(lng = 82.9739144,lat = 25.3176452, zoom = 2) %>% | |
# Add a pop up to map by using addPopups() function | |
addPopups(lng = 82.9739144, lat = 25.3176452, popup = "Varanasi - My Birth Place") | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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