get_ggmap_from_df takes an act_tbl object, computes the
correct zoom and center for that activity, then returns a ggmap object for
that zoom and center.
Arguments
- df
An
act_tblobject.- ...
Additional arguments forwarded to
ggmap::get_googlemap().
Value
A ggmap object, the result of calling ggmap::get_googlemap(),
with the correct center and size to include the entire activity
represented by the act_tbl.
Details
Note that since this calls ggmap::get_googlemap(), you must have
previously called ggmap::register_google() to register an API key.
Examples
if (FALSE) { # \dontrun{
example_gpx_file <- system.file(
"extdata",
"running_example.gpx.gz",
package = "activatr"
)
act_tbl <- parse_gpx(example_gpx_file)
ggmap::ggmap(get_ggmap_from_df(act_tbl))
} # }
