trafficonese / leaflet.extras

Extra functionality for leaflet R package.
https://trafficonese.github.io/leaflet.extras/
GNU General Public License v3.0
211 stars 74 forks source link

Feature request: SelectAreaFeature plugin #180

Open emilmahler opened 4 years ago

emilmahler commented 4 years ago

Hi Bhaskar and gang, It would be extremely useful to have the SelectAreaFeature plugin working with Leaflet for R. I created a Stackoverflow question before I knew leaflet.extras existed. I'd be happy to give an even bigger SO bounty if required.

This feature would be useful for any user looking to select multiple markers or polygons at once by intuitively drawing the region from which you'd like to select. SelectAreaFeature JS demo here .

tim-salabim commented 4 years ago

In case you need this to return selected features back into your R session and don't need to do anything on the JS side with them, you can use mapedit::selectFeatures(<sf_object>, mode = "draw"). See this post for a demo and some more backgrund.

Also note that this repo (leaflet.extras) is currently not well maintained, hence there may not be many more responses to this thread.