get_ggmap_from_df | R Documentation |
act_tbl
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.
get_ggmap_from_df(df, ...)
df |
An |
... |
Additional arguments forwarded to |
Note that since this calls ggmap::get_googlemap()
, you must have
previously called ggmap::register_google()
to register an API key.
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
.
ggmap::get_googlemap()
## Not run:
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))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.