addReachability {leaflet.extras2} | R Documentation |
Add Isochrones to Leaflet
Description
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
Usage
addReachability(map, apikey = NULL, options = reachabilityOptions())
Arguments
map |
a map widget |
apikey |
a valid Openrouteservice API-key. Can be obtained from Openrouteservice |
options |
A list of further options. See |
Value
the new map
object
Note
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
References
https://github.com/traffordDataLab/leaflet.reachability
See Also
Other Reachability Functions:
reachabilityOptions()
,
removeReachability()
Examples
## Not run:
library(leaflet)
library(leaflet.extras2)
Sys.setenv("OPRS" = 'Your_API_Key')
leaflet() %>%
addTiles() %>%
setView(8, 50, 10) %>%
addReachability()
## End(Not run)
[Package leaflet.extras2 version 1.2.2 Index]