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
When using mapview with fgb enabled inside a shiny app, the error Error in addResourcePath: addResourcePath called with invalid prefix; please see documentation gets thrown. When disabling fgb or leaving out the colouring argument, the code works fine.
library(shiny)
library(leaflet)
library(mapview)
#> GDAL version >= 3.1.0 | setting mapviewOptions(fgb = TRUE)# using# mapviewOptions(fgb = FALSE)# and the error disappearsui<- fluidPage(
leafletOutput("map")
)
server<-function(input, output, session) {
output$map<- renderLeaflet(
# when leaving out the zcol argument, the code works!
mapview(franconia, zcol="SHAPE_AREA")@map
)
}
shinyApp(ui, server)
#> Listening on http://127.0.0.1:4374#> Warning: Error in addResourcePath: addResourcePath called with invalid prefix; please see documentation#> [No stack trace available]
To my understanding, the fgb functionality writes the polygons to some temporary file, which is not properly included into the shiny path, but I cant find the exact code. Using temporary files in shiny should work without changing the resource path.
The text was updated successfully, but these errors were encountered:
When using mapview with fgb enabled inside a shiny app, the error
Error in addResourcePath: addResourcePath called with invalid prefix; please see documentation
gets thrown. When disabling fgb or leaving out the colouring argument, the code works fine.I think the issue is related to
leafem
#24.To my understanding, the fgb functionality writes the polygons to some temporary file, which is not properly included into the shiny path, but I cant find the exact code. Using temporary files in shiny should work without changing the resource path.
The text was updated successfully, but these errors were encountered: