powered by
Add a single marker to the map
add_marker(map, lng, lat, popup = NULL)
A mapboxer object.
The longitude of the marker.
The latitude of the marker.
The popup text (HTML) that is displayed when you click on the marker.
# NOT RUN { lng <- -0.09 lat <- 51.5 map <- mapboxer() %>% set_view_state(lng, lat) %>% add_marker(lng, lat, popup = "You are here!") if (interactive()) map # }
Run the code above in your browser using DataLab