The following code creates a brilliant application with (almost) the same output twice. One uses the rcharts package, the other uses a flyer package
The first card has a fullscreen button. Is this accessible via leaflet ()?
library(shiny)
library(rCharts)
library(leaflet)
runApp(
list(ui = (basicPage(
headerPanel("tests"),
mainPanel(
chartOutput("map1", "leaflet"),
"some text...",
leafletOutput('map2')
)
)),
server = function(input, output) {
output$map1 <- renderMap({
map1 <- Leaflet$new()
map1$fullScreen(TRUE)
map1$setView(c(39.603609, -8.415081), 10)
map1
})
output$map2 <- renderLeaflet({
leaflet() %>%
addTiles() %>%
setView(lng = -8.415081, lat = 39.603609, zoom = 10)
})
}
))
thanks
source
share