Markers are prepared to match GeoJSON marker-spec which is a partial implementation of the GeoJSON simplestyle-spec (described as a work-in-progress by Mapbox).
prep_overlay_markers(
data = NULL,
marker_type = c("pin-s", "pin-l", "url"),
label = NA,
color = NA,
longitude = NULL,
latitude = NULL,
url = NA
)
A formatted list of marker specifications that can be passed to the static_mapbox function.
An input data frame with longitude and latitude columns (X and Y
or lon and lat as names are also acceptable) or an sf
object with
geometry type POINT.
The marker type; one of "pin-s"
, for a small pin;
"pin-l"
, for a large pin; and "url"
, for an image path. If
marker_type is the same length as the rows in data, a mix of different
marker types are allowed.
The marker label (optional). Can be a letter, number (0 through 99), or a valid Maki icon (see https://labs.mapbox.com/maki-icons/) for options).
The marker color (optional). color
can be specified as a color
name or as a three or six-digit hexadecimal code (with or without the
number sign).
A vector of longitudes; inferred from the input dataset if
data
is provided.
A vector of latitudes; inferred from the input dataset if
data
is provided.
The URL of the image to be used for the icon if marker_type = "url"
.