What is please the simples way to add title to a leaflet
map object?
I would like to add title to a leaflet map that I have and also wanted to ask about saving as pdf.
When saving as pdf (in example) the map if cut off and there is a lot of empty space in pdf, is there a way how to solve this as well?
library(leaflet)
library(ggplot2)
library(sf)
library(spdep)
library(leaflet.minicharts)
library(leafletCN)
library(mapview)
# Regions of each country selected
URL <- "https://biogeo.ucdavis.edu/data/gadm3.6/Rsp/gadm36_DEU_1_sp.rds"
data <- readRDS(url(URL))
m <-
leaflet() %>% addProviderTiles("CartoDB.Positron") %>%
addPolygons(data=data, weight = 1, fill = F, color = "red")
mapshot(m, file = "m.pdf")