Plot the graph network as a Shiny Leaflet app in a browser.

plot_map(graph, shortest)

Arguments

graph

list containing the probabilistic routing result of the road graph.

shortest

list containing the shortest path routing results of the road graph.

Examples

not_run({ q <- osmdata::opq (bbox = c (11.58, 48.14, 11.585, 48.145)) q <- osmdata::add_feature (q, key = 'highway') x <- osmdata::osmdata_sf(q) net <- osmlines_as_network (x) graph <- make_compact_graph (net) start_pt <- graph$from_id [1] end_pt <- graph$to_id [100] prob <- get_probability (graph, start_pt, end_pt) short <- get_shortest_path (graph, start_pt, end_pt) plot_map (graph = prob, shortest = short) })