Open tim-salabim opened 6 years ago
@tim-salabim thanks for posting here. I will demo this. Testing mapedit
with new leaflet now.
Hi, I'm also interesting to find a way to deselect polygons from the selectMod with a button or other trigger. I don't find a way, but there is surely something Thanks Fabien
@tim-salabim thanks for posting here. I will demo this. Testing
mapedit
with new leaflet now.
@timelyportfolio I would also be very interested in a solution to this problem. Did you do a demo for this?
@gordocabron @Fooourche I'll work on an example to demonstrate/test. If all works, then we can have a discussion about making this easier in mapedit
.
@timelyportfolio HI, I have an option to let user select grid size (e.g., 0.5-degree, 1-degree) for gridded data on shiny. But after changing grid size, all re-drawn grids must be re-selected by user on mapedit map. So I intersect the new grid cells (finer or coarser) with old selected grids and try to make these intersected ones as pre-selected grids on map. I think it's similar problem to this issue. If there any possible solution/example to this issue? Thanks.
The following came up on R-sig-Geo today. I have mirgrated to here as I don't know if @timelyportfolio is on that mailing list:
Hi I am putting together a shiny map app in which I want to allow for selection or deselection of polygons from a map layer. Importantly At the beginning of the process I would like a subset of the polygons to be already selected ( and they can then be deselected using a click if required). The final set of selected polygons is then saved to disk.
Ideally I would like to be able ( eg using a shiny action button) to reset the selection to the pre-selected polygons.
I have the basic click select working fine, but cannot work out how to pre-select some polygons so that they are dis as selected ( and can be deselected with a click) at the start of the process. Secondly is there a way to reset the selection to the pre-selected set.
The pre-selected polygon ids will change depending on another interactive.
toy example of code is below with comments about the two issues that I cannot figure out: