Closed MilanFischer closed 4 years ago
Thanks! I think it is a problem of the app not being closed properly after hitting "Done". I will investigate
I think so too. I actually noticed that if you close the Chrome window in standard way (by hitting ×) it works normally. Thanks for investigating that!
Hi @MilanFischer thanks for your follow up mail. I have not investigated this any further so far. We are currently adding new features to mapedit and this has led to lower priorities of other open issues. Sorry
Hi Tim, thanks for your response. I fully understand that. Cheers, Milan
Hey guys, perhaps any of you or anybody has made any progress or made a workaround?
I should mention that I use Edge as default browser,Milan's workaround doesn't work and this issue shows up with selectFeatures()
function too.
Hi all, we had a look at it together with @MilanFischer and found some kind of a solution. There is problem with user sessions, and with proper ending and starting of those. For simple use we adjusted editMap () function from edit.r. We ust adjusted lines 104-108 to:
shiny::observeEvent(input$done, {
crud()
session$close()
})
This prevents session to be closed unintentionally and also to not to be closed at all. It works for us, while using Chrome to edit data(did not test any other browsers). This is probably more a guide to where real problem is, as we are not experts in R and we also know almost nothing about how shiny etc. works. There is probably more R-way to solve it in general. But we are now able to cycle through data. Hope this helps :)
Everyone, thanks so much for the patience and the suggestions. I believe I have fixed. For reference, the onSessionEnded
handler was preventing the full release/closure of the previous session. Cancelling the registered handler on done/cancel in selectMap
and editMap
seems to resolve the problem.
@MilanFischer, @tim-salabim, @Monika1992, @noriegaedu if possible, will you confirm this fix works for you?
Currently, the change is on master
branch of Github remotes::install_github("timelyportfolio/mapedit")
.
@MilanFischer @tim-salabim @Monika1992 @noriegaedu was anyone able to test? If not, I'll consider complete and push to CRAN by end of weekend.
Just tested with the example above. Seems to work! Again thanks @timelyportfolio for the great work! Before you submit to CRAN, I want to fix #110
Hi Tim, I just tested the new version with the example as well as with the maps (the original purpose) and both works well. Thanks a lot for fixing that and for maintaining the package!
Dear mapedit users, I am trying to make procedure in which I am loading raster maps and then get them to browser (Chrome) and interact with them (making polygons for further masking) using mapedit. I am running this in a batch using the for loop. However, I found that when loading within loop, mapedit is able to open correctly only every second map.
The core of this approach can be simplified in the following loop:
You can see that you are not able to interact with maps 2,4,6,8 and 10.
If I am running that manually for each "i" without the for loop, then it works well. I am using R version 3.5.1. I run the code directly in the Rgui which leads that the mapedit is opened in web browser. I tried it also with R-studio where the same behavior was encountered. If I add a delay within the loop by e.g. Sys.sleep(5) then you can see that there is attempt to open maps 2,4,6,8 and 10 but it results in the following Chrome message "This site can’t be reached 127.0.0.1 refused to connect."
I would be thankful for any suggestion.
Milan