decode_pl: Decode PL

Description Usage Arguments Value Note See Also Examples

View source: R/polyline.R

Description

Decodes an encoded polyline into the series of lat/lon coordinates that specify the path

Usage

1
decode_pl(encoded)

Arguments

encoded

String. An encoded polyline

Value

data.frame of lat/lon coordinates

Note

An encoded polyline is generated from google's polyline encoding algorithm (https://developers.google.com/maps/documentation/utilities/polylinealgorithm).

See Also

encode_pl, google_directions

Examples

1
2
3
4
5
## polyline joining the capital cities of Australian states
pl <- "nnseFmpzsZgalNytrXetrG}krKsaif@kivIccvzAvvqfClp~uBlymzA~ocQ}_}iCthxo@srst@"

df_polyline <- decode_pl(pl)
df_polyline

googleway documentation built on Nov. 16, 2020, 9:08 a.m.