Compute map distances using Google's Distance Matrix API. Note: To use
Google's Distance Matrix API, you must first enable the API in the Google
Cloud Platform Console. See register_google()
.
mapdist(
from,
to,
mode = c("driving", "walking", "bicycling", "transit"),
output = c("simple", "all"),
urlonly = FALSE,
override_limit = FALSE,
ext = "com",
inject = "",
...
)distQueryCheck()
a data frame (output="simple") or all of the geocoded information (output="all")
name of origin addresses in a data frame (vector accepted), or a data frame with from and to columns
name of destination addresses in a data frame (vector accepted)
driving, bicycling, walking, or transit
amount of output
return only the url?
override the current query count (.google_distance_query_times)
top level domain domain extension (e.g. "com", "co.nz")
character string to add to the url
...
David Kahle david@kahle.io
if parameters from and to are specified as geographic coordinates, they are reverse geocoded with revgeocode. note that the google maps api limits to 2500 element queries a day.