Annotating Location on a Map
We shall plot the location of Sentosa and annotate it with a location landmark and text.
addr <- 'Sentosa'
loc <- as.numeric(geocode(addr))
map <- get_map(loc, zoom=15, maptype='satellite', source='google')
lbl <- data.frame(lon=loc[1], lat=loc[2], text=addr)
ggmap(map) +
geom_text(data=lbl, aes(x=lon, y=lat, label=text),
colour='blue', vjust=1.5) +
geom_point(data=lbl, aes(x=lon, y=lat),
colour='red', size=3)