# NOT RUN {
# Load data
data("berlin")
library(sf)
# Get a trip with a set of points (sf POINT)
trips <- osrmTrip(loc = apotheke.sf, returnclass = "sf")
mytrip <- trips[[1]]$trip
# Display the trip
plot(st_geometry(mytrip), col = "black", lwd = 4)
plot(st_geometry(mytrip), col = c("red", "white"), lwd = 1, add = TRUE)
plot(st_geometry(apotheke.sf), pch = 21, bg = "red", cex = 1, add = TRUE)
# }
Run the code above in your browser using DataLab