Adds a title to a map

add_title(map, title, layer_id = NULL)

Arguments

map

a mapdeck map object

title

Either a single string for the title, or a list with a 'title' element, and an optional 'css' element. See examples

layer_id

single value specifying an id for the layer. Use this value to distinguish between shape layers of the same type. Layers with the same id are likely to conflict and not plot correctly

Examples

# \donttest{ mapdeck() %>% add_title(title = "first title", layer_id = "first") %>% add_title(title = list( title = "second title", css = "background-color: red;"), layer_id = "second") %>% add_title(title = list( title = "Another title", css = "background-color: transparent;"), layer_id = "third") # }