viaroute(startlat = NULL, startlng = NULL, endlat = NULL, endlng = NULL, viapoints = NULL, api = 5, profile = "driving", protocol = "v1", osrmurl = "http://router.project-osrm.org", zoom = 18, instructions = TRUE, alt = TRUE, geometry = TRUE, uturns = "default")
"http://router.project-osrm.org"
.## Not run:
# exroutes <- viaroute(50, 0, 51, 1)
# r1 <- viaroute2sldf(exroutes)
# exroutes <- viaroute(50, 0, 51, 1, zoom = 4)
# r2 <- viaroute2sldf(exroutes)
# # Requires mapview to be installed
# # Show the difference between outputs with different zoom levels
# mapview::mapview(r1) +
# mapview::mapview(r2, color = "blue")
# exroutes <- viaroute(viapoints=list(data.frame(x=c(-33.5,-33.6,-33.7),y=c(150,150.1,150.2))))
# r <- viaroute2sldf(exroutes)
# plot(r)
# ## End(Not run)
Run the code above in your browser using DataLab