Skip to content

consider check inputs of mb_isochrone #54

@andypicke

Description

@andypicke

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
Run rlang::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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions