trafficonese / leaflet.extras

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

wish: make objects created with Leaflet.Draw accessible in shiny #66

Closed dmlee8215 closed 7 years ago

dmlee8215 commented 7 years ago

It would be super useful if e.g. a polygon created on a leaflet/shiny map after invoking addDrawToolbar could be used in other parts of the app, though something like input$MAPID_shape_click. Thanks for your work on leaflet.extras, this functionality is awesome!

bhaskarvk commented 7 years ago

They already are. Check https://github.com/bhaskarvk/leaflet.extras/blob/master/inst/examples/shiny/draw-events/app.R