Skip to contents

Create a MapLibre GL output for use in Shiny

Usage

mapOutput(outputId, width = "100%", height = "600px")

Arguments

outputId

output variable to read from.

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

Value

A MapLibre GL map for use in a Shiny UI.

Examples

if(interactive()){
library(shiny)
library(toro)

ui <- fluidPage(
 tagList(
   mapOutput("map")
 )
)
server <- function(input, output, session) {
 output$map <- renderMap({
   map()
 })
}
}