add_drawing.RdAdds drawing tools to the map. Particularly useful when in an interactive (shiny) environment.
add_drawing(map, drawing_modes = c("marker", "circle", "polygon", "polyline", "rectangle"), delete_on_change = FALSE)
| map | a googleway map object created from |
|---|---|
| drawing_modes | string vector giving the drawing controls required. One of one or more of marker, circle, polygon, polyline and rectangle |
| delete_on_change | logical indicating if the currently drawn shapes should be deleted when a new drawing mode is selected (only works in a reactive environment) |
# NOT RUN { map_key <- 'your_api_key' google_map(key = map_key) %>% add_drawing() # }