Get coordinates from a drawing object from an R leaflet map
问题 I am building a shiny app where I would like to get the coordinates of a polygon from a leaflet map. Specifically, the shape is drawn using the Drawtoolbar from the leaflet.extras package. A simple example app is below. My question is, how can I get the coordinates from the shape drawn on the map by the user? Thank you in advance. library(shiny) library(leaflet) library(leaflet.extras) # Define UI ui <- fluidPage( leafletOutput("mymap",height=800) ) # Define server logic server <- function