Create a leaflet map object.
library(leaflet)
## Warning: パッケージ 'leaflet' はバージョン 4.3.3 の R の下で造られました
map <- leaflet() %>% addTiles()
Create a marker with a picture of NUS and a link to its homepage.
NUSIcon <- makeIcon(
iconUrl = "https://images.app.goo.gl/Fm7oC4sJptegr8vC8",
iconWidth = 30*408/255, iconHeight = 30,
iconAnchorX = 30*408/255/2, iconAnchorY = 30/2
)
Add the marker to the map and display the map.
NUS_Popup <- "<a href='https://msba.nus.edu.sg/'>NUS business school<br><img src='https://images.app.goo.gl/Fm7oC4sJptegr8vC8' width='210' height='132' alt='NUS MSBA site' title='NUS MSBA site'></a>"
map %>%
addTiles() %>%
addMarkers(lat = 1.298679, lng = 103.774767, popup = NUS_Popup)