This document will show several tourist attractions in Melbourne city. When you click your mouse on the specific photo, it will show you the link to a more detailed introdution of this tuorist attraction.
library(leaflet)
## Warning: package 'leaflet' was built under R version 3.4.4
icon <- makeIcon(
iconUrl = c(
"FlindersStreet.jpg",
"MelbourneUni.jpg",
"VictoriaMarket.jpg",
"StateLibrary.jpeg"
),
iconWidth = 31*215/60,
iconHeight = 80,
iconAnchorX = 31*215/230/2,
iconAnchorY = 16
)
latAndLong <- data.frame(
lat = c(-37.818271, -37.796369, -37.807580, -37.809809),
long = c(144.967062, 144.961174, 144.956785, 144.965190)
)
links <- c(
"<a href='https://www.rydges.com/accommodation/melbourne-vic/the-victoria-hotel/things-to-do/flinders-street-railway-station/'>Flinders Station</a>",
"<a href='https://mbs.unimelb.edu.au/events/information-sessions/university-of-melbourne-information-day6'>The University of Melbourne</a>",
"<a href='http://www.beat.com.au/content/queen-victoria-market-host-first-melbourne-barbecue-festival'>Queen Victoria Market</a>",
"<a href='http://www.visitvictoria.com/regions/Melbourne/Things-to-do/Art-theatre-and-culture/Literature/State-Library-Victoria.aspx'>Victoria State Library</a>"
)
my_map <- latAndLong %>% leaflet() %>% addTiles() %>% addMarkers(icon = icon, popup = links)
my_map