path_leaflet | R Documentation |
The function path_leaflet
visualizes the shortest path (in minutes or meters) that has been calculated with the function shortest_path_igraph()
(where path = TRUE
).
Internet connection is required to load the background tiles.
path_leaflet(path, graph_object = graph)
path |
Object ( |
graph_object |
The road network structured as a tidy graph ( |
Interactive Leaflet map that shows the shortest path (in minutes or meters) between a chosen from and to node in the road network.
shortest_path_igraph(from_node_ID = 25, to_node_ID = 33, unit = "minutes", path = TRUE, graph_object = graph_sampledata) %>% path_leaflet(graph_object = graph_sampledata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.