Closed mdbeh closed 5 months ago
I'll be resuming development of leaflet.extras in Dec and will tackle this in that round. Thanks!
related: https://github.com/rstudio/shiny/issues/1465 https://github.com/wch/jsonlite/commit/9091eb0b3ecb48fffc5ad4e8fbae67ca84ff673f
So far I have no idea where that "named vectors" comes from. The geojson is just a string.
reprex:
library(shiny)
library(leaflet)
library(leaflet.extras)
geoJson <- readr::read_file(
"https://rawgit.com/benbalter/dc-maps/master/maps/historic-landmarks-points.geojson"
)
ui <- fluidPage(
leafletOutput("map")
)
server <- function(input, output, session) {
output$map <- renderLeaflet({
leaflet() %>%
setView(-77.0369, 38.9072, 12) %>%
addProviderTiles(providers$CartoDB.Positron) %>%
addWebGLGeoJSONHeatmap(
geoJson, size = 30 , units = "px"
)
})
}
shinyApp(ui, server)
When I include a WebGLHeatmap on a leaflet map in Shiny, I'm getting the following warning:
Looking around a bit, it seems like this is a standard message people are getting when they use vectors instead of lists in the manner described. It's not a fatal error, but it does clog up the console (it gets printed every time I change a map parameter), and I wouldn't want to deliver something that has a soon-to-be-obsolete control.
So any help/suggestions would be appreciated. BTW, I know there are other heatmap options, but I've found this webGL one to work best for me.