add_title: Add Title

Description Usage Arguments Examples

View source: R/map_layer_title.R

Description

Adds a title to a map

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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")

mapdeck documentation built on Sept. 4, 2020, 9:07 a.m.