Learn R Programming

leaflet.extras2 (version 1.3.1)

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())

Value

the new map object

Arguments

map

a map widget

apikey

a valid Openrouteservice API-key. Can be obtained from Openrouteservice

options

A list of further options. See reachabilityOptions

References

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

See Also

Other Reachability Functions: reachabilityOptions(), removeReachability()

Examples

Run this code
if (FALSE) {
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