We are going to create an interactive map of Real Madrid’s Stadium location. First, we will make Real Madrid icon and URL web page.
library(leaflet)
rmIcon=makeIcon("http://www.freeiconspng.com/uploads/real-madrid-logo-png-29.png",iconWidth=30,iconHeight = 35)
rmURL="<a href= 'http://www.realmadrid.com' >Santiago Bernabeu</a>"
Creating the map of Madrid:
rmLatLong=data.frame(lat=40.453066,
lng=-3.688386)
rmLatLong %>%
leaflet() %>%
addTiles() %>%
addMarkers(icon=rmIcon,popup=rmURL)
If we click on Real Madrid’s shield, we will be able to see the link of Real Madrid website.