mapboxapi
mapboxapi copied to clipboard
consider check inputs of mb_isochrone
I just spent a while debugging why my call to mb_isochrone() wasn't working, and finally realized that I was passing in profile="Driving" instead of profile="driving" to the profile input. The error message wasn't very helpful:
x <- mb_geocode("Denver,CO", output = "sf") iso <- mb_isochrone(x,profile = "Driving", time = 5) Error in
purrr::map2()
: ℹ In index: 1. Caused by error: ! Not Found Runrlang::last_trace()
to see where the error occurred.
My suggestion would be to change
profile="driving" in the definition of mb_isochrone() to:
profile = c("driving","walking","cycling","driving-traffic"), and add the line
profile = match.arg(profile) at the top of the function.