add_drawing: Add Drawing

Description Usage Arguments Examples

View source: R/google_map_layer_drawing.R

Description

Adds drawing tools to the map. Particularly useful when in an interactive (shiny) environment.

Usage

1
2
3
4
5
add_drawing(
  map,
  drawing_modes = c("marker", "circle", "polygon", "polyline", "rectangle"),
  delete_on_change = FALSE
)

Arguments

map

a googleway map object created from google_map()

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)

Examples

1
2
3
4
5
6
7
8
## Not run: 

map_key <- 'your_api_key'
google_map(key = map_key) %>%
  add_drawing()


## End(Not run)

Example output



googleway documentation built on Nov. 16, 2020, 9:08 a.m.