The below map displays my favourite Beer Bars in Bombay.
There may be some loading issues with the map tiles because of network connections / firewalls etc. If the map seems greyed out, please change the zoom levels to view the same.
To start with, we initiate the leaflet library
library(leaflet)
Then we fetch the Beer icons. Why? Cause an icon is worth a thousand words!
BeerIcon <- makeIcon(
iconUrl = "https://image.flaticon.com/icons/svg/168/168557.svg",
iconWidth = 31*215/230, iconHeight = 31,
iconAnchorX = 31*215/230/2, iconAnchorY = 16
)
Coding the coordinates of the watering holes along with the zomato listings (a click on the marker popups will take you there). You know, so that you can check the reviews and know what food to order before you reach the place.
BombayBeerLatLong <- data.frame(
lat = c(18.922612, 18.922731),
long = c(72.832508, 72.831658)
)
BombayBeerPopup <- c(
"<a herf= 'https://www.zomato.com/mumbai/alps-restaurant-and-beer-bar-colaba' >Alps Beer Bar</a>",
"<a herf= 'https://www.zomato.com/mumbai/leopold-cafe-bar-colaba' >Leopold Cafe & Bar</a>"
)
And here are the directions.
BombayBeerLatLong %>%
leaflet() %>%
addTiles() %>%
addMarkers(icon = BeerIcon, popup = BombayBeerPopup) %>%
setView(72.832508, 18.922612, zoom = 18.03)
Cheers!