Description Usage Arguments Value
View source: R/HERE_drivetime.R
HERE_drivetime
is designed to take degree or
radian geocoordinates, user app credentials, and some other API inputs (set
to defaults). The function queries the HERE.com Routing API (https://
developer.here.com/documentation/routing/topics/what-is.html)
and return
the drive time from the JSON output code. This driveTime portion of the JSON
is originally return in seconds. This function is designed to take an
argument for the user preferred time (seconds, minutes, or hours) as a non-
integer, numeric value (a number with decimals).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
origin |
a vector of length two (2); the latitude and longitude coordinates of the origin location |
destination |
a vector of length two (2); latitude and longitude coordinates of the destination location |
app_api |
a string; the user's API Key Credentials for the HERE.com JavaScript/REST (requires registration) |
app_id |
a string; the user's App ID for the HERE.com JavaScript/REST (requires registration) |
app_code |
a string; the user's App Code for the HERE.com JavaScript/REST (requires registration) |
time_frmt |
a string; the user's preferred time format:
|
type |
a string; a method of deciding optimal travel route:
|
trnsprt |
a string; a transportation method for the route:
|
trfc |
a string; whether or not to factor in traffic:
|
coord_typ |
a string; if the geocoordinates are in degrees or radians:
|
dev |
a boolean; whether to use development or production site |
verbose |
a boolean; |
the travel time as specified between two locations
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.