Learn R Programming

leafletCN (version 0.2.2)

addTitle: Add title to the leaflet

Description

Function for creating a h1 title to the leaflet

Usage

addTitle(object, text, color = "black", fontSize = "20px",
 fontFamily = "Sans", leftPosition = 50, topPosition = 2)

Arguments

object

an leaflet object

text

content of the title

color

title color, default: 'black'

fontSize

font size for the title default: '20px'

fontFamily

font family for the title, default: 'Sans'

leftPosition

the percent of the title postition to left, default: 50

topPosition

the percent of the title postition to top, default:2

Examples

Run this code
# NOT RUN {
demomap('china') %>% addTitle("Hello World")

# }

Run the code above in your browser using DataLab