Description Usage Arguments Examples
Add a single marker to the map
1 | add_marker(map, lng, lat, popup = NULL)
|
map |
A mapboxer object. |
lng |
The longitude of the marker. |
lat |
The latitude of the marker. |
popup |
The popup text (HTML) that is displayed when you click on the marker. |
1 2 3 4 5 6 7 8 | lng <- -0.09
lat <- 51.5
map <- mapboxer() %>%
set_view_state(lng, lat) %>%
add_marker(lng, lat, popup = "You are here!")
if (interactive()) map
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.