Description Usage Arguments Value Author(s) See Also Examples
Adds a polygon to an existing ggmap object.
1 | plot_polygon(polygon, colour = "blue", plot = "", zoom = -1)
|
polygon |
list. A list with the column lon (numeric) and lat (numeric). |
colour |
character. Colour of the line. |
plot |
ggmap. An existing map / plot where the tracks are added. If no plot is provided a Google map will be downloaded. |
zoom |
numeric. Zoom factor of the map. See ggmap::get_googlemap. |
A ggmap object.
Benjamin Ziepert. Please send feedback to: feedback-psyosphere@analyse-gps.com.
plot_map
, plot_line
, plot_tracks
1 2 3 4 5 6 7 8 9 10 | ## Not run: \dontrun{
lon <- c(6.849975, 6.849627, 6.850001, 6.850350, 6.849975)
lat <- c(52.241745, 52.241100, 52.241004, 52.241649, 52.241745)
polygon <- data.frame(lon, lat)
remove(lon, lat)
plot <- plot_polygon(polygon)
plot
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.