You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to get compare() working in a Shiny app. I've tried to make a minimal reproducible example here. It gives the error: Warning in renderWidget(instance) : Ignoring explicitly provided widget ID "compare-container-db634"; Shiny doesn't use them.
# Load libraries
library(shiny)
library(mapgl)
# Define UI
ui <- fluidPage(
titlePanel("Map Comparison"),
mainPanel(
mapboxglOutput("compare_map", height = "800px")
)
)
# Define Server logic
server <- function(input, output, session) {
output$compare_map <- renderMapboxgl({
m1 <- mapboxgl(style = mapbox_style("light"))
m2 <- mapboxgl(style = mapbox_style("dark"))
# Use the compare function as documented
compare(m1, m2)
})
}
# Run the application
shinyApp(ui = ui, server = server)
The text was updated successfully, but these errors were encountered:
compare() doesn't work in Shiny yet. Because of how it's structured it's technically a separate HTMLwidget that would need its own render function. I'd like to get this working eventually!
Hey, I would love to get this working, however I am not really familiarised with rendering HTMLwidgets yet. Are there any updates on this function? Thanks!
Hello,
I can't seem to get compare() working in a Shiny app. I've tried to make a minimal reproducible example here. It gives the error:
Warning in renderWidget(instance) : Ignoring explicitly provided widget ID "compare-container-db634"; Shiny doesn't use them
.The text was updated successfully, but these errors were encountered: