get_latlon: get latitude and longitude from Google polyline

View source: R/get_LatLon.R

get_latlonR Documentation

get latitude and longitude from Google polyline

Description

get latitude and longitude from Google polyline

Usage

get_latlon(polyline, key)

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

Value

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

Author(s)

Daniel Padfield, Marcus Beck

Examples

## Not run: 
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)

## End(Not run)

rStrava documentation built on Oct. 23, 2024, 5:06 p.m.

Related to get_latlon in rStrava...