# Thu Sep 03 00:51:03 2020 -
# 字符编码:UTF-8
# R 版本:R x64 4.0.2 for window 10
# cgh163email@163.com
# 个人笔记不负责任
# —— 拎了个梨🍐
rm(list=ls());gc()
.rs.restartR()
require(mapdeck)
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")
1 map a mapdeck map object 一个mapdeck地图对象
2 title Either a single string for the title, or a list with a 'title' element, and an optional 'css' element. See examples 标题可以使用单个字符串,也可以使用带有“ title”元素和可选“ css”元素的列表。 查看范例
3 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 指定图层ID的单个值。 使用此值可以区分相同类型的形状图层。 具有相同ID的图层可能会发生冲突并且无法正确绘制