# NOT RUN {
# load leaflet package
library(leaflet)
l <- leaflet()
# create a source point (Big Ben) and some random targets
s <- data.frame(lat = 51.5007, lng = -0.1246, id = "BigBen")
t <- data.frame(lat = runif(min = 51.495, max = 51.5055, n = 100),
lng = runif(min = -0.175, max = -0.075, n = 100))
# get the times
times <- getTargomoTimes(source_data = s, target_data = t,
options = targomoOptions(travelType = "car"))
# draw them on the map
l %>% drawTargomoTimes(times = times)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab