Learn R Programming

rStrava (version 1.3.1)

get_latlon: get latitude and longitude from Google polyline

Description

get latitude and longitude from Google polyline

Usage

get_latlon(polyline, key)

Value

dataframe of latitude and longitudes with a column for the unique identifier

Arguments

polyline

a map polyline returned for an activity from the API

key

chr string of Google API key for elevation data, passed to google_elevation

Author

Daniel Padfield, Marcus Beck

Examples

Run this code
if (FALSE) {
stoken <- httr::config(token = strava_oauth(app_name, app_client_id, app_secret, cache = TRUE))

my_acts <- get_activity_list(stoken)
acts_data <- compile_activities(my_acts)

# get lat and lon for a single activity
polyline <- acts_data$map.summary_polyline[[1]]
get_latlon(polyline, key = mykey)
}

Run the code above in your browser using DataLab