addReachability | R Documentation |
A leaflet plugin which shows areas of reachability based on time or distance for different modes of travel using the openrouteservice isochrones API. Based on the leaflet.reachability plugin
addReachability(map, apikey = NULL, options = reachabilityOptions())
map |
a map widget |
apikey |
a valid Openrouteservice API-key. Can be obtained from Openrouteservice |
options |
A list of further options. See |
the new map
object
When used in Shiny, 3 events update a certain shiny Input:
reachability:displayed updates input$MAPID_reachability_displayed
reachability:delete updates input$MAPID_reachability_delete
reachability:error updates input$MAPID_reachability_error
https://github.com/traffordDataLab/leaflet.reachability
Other Reachability Functions:
reachabilityOptions()
,
removeReachability()
## Not run:
library(leaflet)
library(leaflet.extras2)
Sys.setenv("OPRS" = "Your_API_Key")
leaflet() %>%
addTiles() %>%
setView(8, 50, 10) %>%
addReachability()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.