Learn R Programming

rStrava (version 1.0.0)

decode_Polyline: Decode Google polyline of an activity into latitude and longitude

Description

Decodes Google's polyline that are given in get_activity() and get_activity_list()

Usage

decode_Polyline(Google_polyline)

Arguments

Google_polyline

character element of Google polyline of an activity

Value

A vector of latitudes an longitudes in decimals separated by a comma

Details

When getting an activity using get_activity() a Google polyline is returned as one of the outputs. This function converts the polyline into latitude and longitude coordinates suitable for plotting. Function is used internally within get_latlon.

References

Original code from : https://s4rdd.blogspot.co.uk/2012/12/google-maps-api-decoding-polylines-for.html?showComment=1473004506791#c3610119369153401460

Examples

Run this code
# NOT RUN {
decode_Polyline()
# }

Run the code above in your browser using DataLab