One bug about Editmod Delete Feature
gubb673 opened this issue · comments
I just find that if you add too many shapes (more than three usually) in Editmods and delete then it will occur a bug shows "argument is of length zero".
I find this when using the code in your case: "Edit as Shiny Module"
https://www.r-spatial.org/r/2017/06/09/mapedit_0-2-0.html
I think this might be caused by the code
base_map <- leaflet(ns("map")) %>%
addTiles() %>%
addDrawToolbar(
# targetLayerId = "draw",
targetGroup = "draw",
# polygonOptions = FALSE,
circleOptions = FALSE,
# rectangleOptions = FALSE,
polylineOptions = FALSE,
markerOptions = FALSE,
circleMarkerOptions = FALSE,
editOptions = editToolbarOptions()
)%>%
addFeatures(nc)%>%
addLayersControl(overlayGroups = c("draw"), options = layersControlOptions(collapsed = FALSE))
drawn <- callModule(editMod, "editor", base_map)
req(drawn()$finished)
However, it can't be caught by a trycatch in my R studio