Description Usage Arguments Value See Also
Build and send OSRM API queries to get travel time matrices between objects. This function interfaces the table OSRM service.
1 2 3 4 5 6 7 | osrm_table(
src = NULL,
dst = NULL,
measure = "duration",
osrm_profile = "driving",
osrm_server = getOption("osrm.server")
)
|
src |
A data frame containing origin objects identifiers, longitudes
and latitudes (WGS84). It can also be a |
dst |
A data frame containing destination objects identifiers, longitudes
and latitudes (WGS84). It can also be a |
measure |
A character indicating what measures are calculated. It can be "duration" (in minutes), "distance" (meters), or both c('duration', 'distance'). The public server only allows "duration". |
osrm_profile |
The routing profile to use, e.g. "car", "bike" or "foot"
(when not using the public server). Uses |
osrm_server |
The base URL of the routing server. Uses
|
A list containing 3 data frames is returned.
durations
is the matrix of travel times (in minutes);
sources
and destinations
are the coordinates of
the origin and destination objects actually used to compute the travel
times (WGS84).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.