gh_get_route: Get a route for a given set of points

Description Usage Arguments See Also Examples

View source: R/route-endpoint.R View source: R/obsolete/route.R

Description

Get a route for a given set of points

Usage

1
gh_get_route(points, ..., response_only = FALSE)

Arguments

points

A list of 2 or more points as (lat, lon) pairs.

...

Optional parameters that are passed to the query.

response_only

Whether to return the raw response object instead of just its content.

See Also

https://docs.graphhopper.com/#tag/Routing-API for optional parameters.

Examples

1
2
3
4
5
6
7
if (FALSE) {
  start_point <- c(52.592204, 13.414307)
  end_point <- c(52.539614, 13.364868)

  route_sf <- gh_get_route(list(start_point, end_point)) %>%
    gh_as_sf()
}

crazycapivara/graphhopper-r documentation built on July 19, 2021, 1:16 p.m.