-
Notifications
You must be signed in to change notification settings - Fork 33
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
Edit existing feature within Shiny and save #105
Comments
This is exactly what I am trying to do. So far I have only found this link: https://gis.stackexchange.com/questions/203540/how-to-edit-an-existing-layer-using-leaflet |
@ngfrey @RossPitman To edit an existing layer, we will need to add a group in
Then in
With polylines since there are so many points to edit, there will be a delay, but you should within a reasonable time see the below screenshot. You might wonder about the red. These are marked as invalid polylines. |
While @timelyportfolio is definitely correct that it makes the map editable, it doesn't allow you to access the changes from what I can tell. Consider this: ui <- fluidPage( server <- function(input,output,session) { } shinyApp(ui,server) When you edit the target layer, there's no output. But, when you draw on a feature, this script will collect the intersection and display the shapes in mapview. In in the EditMap module, edits are coded as $edited_all. But if you switch edits()$finished to edits()$edited_all, there's no capturing of your edited shapes. How do I get that edited layer to respond downstream? Any ideas? |
@davis3tnpolitics, I think pull request #98 just merged into master and hopefully soon on CRAN will solve the issue. If possible, please install newest with For
|
I didn't know there was a pull coming for this. Thanks so much @timelyportfolio. Really appreciate this amazing package! |
The examples that are reported here are about data that it is loaded locally, but i would ask if it is possible to use this framework in order to update a reactive shapefile that is loaded from a remote Postgresdatabase? I will try to explain me better. After users have authenticated themselves, I would like to allow users to edit/add/delete shapefiles that are in a remote Postgres database? all to update the database. is it possible to do this with mapedit? I have tried several ways but it didn't work so i will report here a code that could be used as start point in order to solve this.
|
Dear all, Now my code can import the shapefile (reactive object) and visualize and edit it within the editmod of mapedit. Moreover i can also create a new spatialpolygonsdataframe. But when I go to plot my result I can't get the polygons in the map. Does anyone have a workflow that allows you to get the last polygons put in the map
|
I'm trying to create a shiny app with mapedit that will allow me to load a feature (in this example it is the nc.shp from the sf package as an example), and then edit that same feature using mapedit. Currently, I cannot edit it the original feature, but I can edit new features that I create. Is mapedit capable of editing the original feature? It would seem unfortunate if it couldn't, and if so, is there any way to get around this using mapedit?
Thanks very much for the great package!
Reproducible code below as an example. Many thanks!
The text was updated successfully, but these errors were encountered: