# NOT RUN {
# load leaflet package
library(leaflet)
l <- leaflet()
# get route from Big Ben to Tower Bridge
r <- getTargomoRoutes(source_lat = 51.5007, source_lng = -0.1246,
target_lat = 51.5055, target_lng = -0.0754,
options = targomoOptions(travelType = c("bike", "transit")))
# draw the routes on the map
l %>% drawTargomoRoutes(routes = r)
# note, could combine get.. and draw... into one with add...
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab