1

I have the below code that gives me a map using mapview() that draws a map for me but I'd like to know how to give it a title i.e "Map Showing Airports of the World". Must be something very basic I can't really figure out.

library(OpenStreetMap)
library(mapview)
library(mapdata)
airports <- read.delim("https://slcladal.github.io/data/airports.txt", 
                       sep = "\t", header = T)

Airport_Location <- st_as_sf(x = airports, 
            coords = c("Longitude", "Latitude"),
            crs = "+proj=longlat +datum=WGS84")


mapview(Airport_Location)

aqkhan
  • 66
  • 8
  • Map titles are currently not possible in mapview directly. Where would you want the title to be displayed? You could use `leaflet::addControl` to add a title after you created your map with mapview – TimSalabim Feb 19 '21 at 09:36
  • @timSalabim , I'd like to add it to the top like you would on a normal graph. Thanks for your tip. – aqkhan Feb 20 '21 at 11:02

0 Answers0