walkerke / mapboxapi

R interface to Mapbox web services
https://walker-data.com/mapboxapi/
Other
110 stars 8 forks source link

Is it possible to add an `mb_distance` function? #15

Closed Rmadillo closed 2 years ago

Rmadillo commented 2 years ago

Hi,

I was wondering if it is possible to add an mb_distance function that would operate like the mb_isochrone function, only it would return distance instead of travel time? It looks like the Mapbox API does support this (https://docs.mapbox.com/api/navigation/isochrone/), but I am not sure how to adjust your code to make it work, especially since the API will only return time or distance, but not both at the same time.

Thanks for considering it!

walkerke commented 2 years ago

Thanks for the heads up! This would be a great new feature. I'll implement it in mb_isochrone() but allow for distance intervals instead of time intervals. I'll let you know when it's ready.

walkerke commented 2 years ago

This is now implemented and on CRAN!

Rmadillo commented 2 years ago

Thank you so much!