Create a leaflet map object.
library(leaflet)
## Warning: package 'leaflet' was built under R version 4.0.3
map <- leaflet() %>% addTiles()
Create a marker with a picture of Benrath Palace and a link to its homepage.
RainbowRuiruIcon <- makeIcon(
iconUrl = "https://www.google.com/search?q=image+of+ruiru&sxsrf=ALeKk00Aez1N4JtHfyDeO6rzWwle3_rEww:1605864597775&tbm=isch&source=iu&ictx=1&fir=l_fgE2oQVa5JWM%252C4xl48qvtbF9dWM%252C_&vet=1&usg=AI4_-kQk38r9oSVKF70ZGB3Sz0Vy779MMQ&sa=X&ved=2ahUKEwiz9qDn55DtAhWrUBUIHZ5lAUIQ9QF6BAgKED8#imgrc=l_fgE2oQVa5JWM",
iconWidth = 30*408/255, iconHeight = 30,
iconAnchorX = 30*408/255/2, iconAnchorY = 30/2
)
Add the marker to the map and display the map.
RainbowRuiruPopup <- ("https://www.google.com/search?q=image+of+ruiru&sxsrf=ALeKk00Aez1N4JtHfyDeO6rzWwle3_rEww:1605864597775&tbm=isch&source=iu&ictx=1&fir=l_fgE2oQVa5JWM%252C4xl48qvtbF9dWM%252C_&vet=1&usg=AI4_-kQk38r9oSVKF70ZGB3Sz0Vy779MMQ&sa=X&ved=2ahUKEwiz9qDn55DtAhWrUBUIHZ5lAUIQ9QF6BAgKED8#imgrc=l_fgE2oQVa5JWM")
map %>%
addTiles() %>%
addMarkers(lat=-1.142666096, lng=36.9605, popup = RainbowRuiruPopup)