add_marker {mapboxer}R Documentation

Add a single marker to the map

Description

Add a single marker to the map

Usage

add_marker(map, lng, lat, popup = NULL)

Arguments

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.

Examples

lng <- -0.09
lat <- 51.5

map <- mapboxer() %>%
  set_view_state(lng, lat) %>%
  add_marker(lng, lat, popup = "You are here!")

if (interactive()) map

[Package mapboxer version 0.4.0 Index]