Learn R Programming

leaflet.extras2 (version 1.0.0)

addReachability: 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 reachabilityOptions

Value

the new map object

References

https://github.com/traffordDataLab/leaflet.reachability

See Also

Other Reachability Functions: reachabilityOptions(), removeReachability()

Examples

Run this code
# NOT RUN {
library(leaflet)
library(leaflet.extras2)

Sys.setenv("OPRS" = 'Your_API_Key')

leaflet() %>%
  addTiles() %>%
  setView(8, 50, 10) %>%
  addReachability()
# }

Run the code above in your browser using DataLab