Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One bug about Editmod Delete Feature #82

Open
gubb673 opened this issue Oct 13, 2018 · 1 comment
Open

One bug about Editmod Delete Feature #82

gubb673 opened this issue Oct 13, 2018 · 1 comment

Comments

@gubb673
Copy link

gubb673 commented Oct 13, 2018

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

@gubb673
Copy link
Author

gubb673 commented Oct 14, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant