# NOT RUN {
apiKey <- "your_api_key"
## results returned as a list (simplify == TRUE)
lst <- google_directions(origin = c(-37.8179746, 144.9668636),
destination = c(-37.81659, 144.9841),
mode = "walking",
key = apiKey,
simplify = TRUE)
## results returned as raw JSON character vector
js <- google_directions(origin = c(-37.8179746, 144.9668636),
destination = c(-37.81659, 144.9841),
mode = "walking",
key = apiKey,
simplify = FALSE)
access_result(js, "polyline")
direction_polyline(js)
# }
Run the code above in your browser using DataLab