View source: R/intermodal_route.R
intermodal_route | R Documentation |
Calculates route geometries (LINESTRING
) between given pairs of points using the HERE 'Intermodal Routing' API.
intermodal_route(
origin,
destination,
datetime = Sys.time(),
results = 3,
transfers = -1,
url_only = FALSE
)
origin |
|
destination |
|
datetime |
|
results |
numeric, maximum number of suggested route alternatives (Valid range: 1 and 7, |
transfers |
numeric, maximum number of transfers allowed per route (Valid range: -1 and 6, |
url_only |
boolean, only return the generated URLs ( |
An sf
object containing the requested intermodal routes.
HERE Intermodal Routing API: Routes
# Provide an API Key for a HERE project
set_key("<YOUR API KEY>")
# Intermodal routing
routes <- intermodal_route(
origin = poi[1:3, ],
destination = poi[4:6, ],
url_only = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.