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

Description Usage Arguments Examples

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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)

## End(Not run)

osm-router/osmprob documentation built on May 24, 2019, 4:53 p.m.