addMapkeyMarkers | R Documentation |
Add Mapkey Markers
addMapkeyMarkers(
map,
lng = NULL,
lat = NULL,
layerId = NULL,
group = NULL,
icon = NULL,
popup = NULL,
popupOptions = NULL,
label = NULL,
labelOptions = NULL,
options = leaflet::markerOptions(),
clusterOptions = NULL,
clusterId = NULL,
data = leaflet::getMapData(map)
)
map |
the map to add mapkey Markers to. |
lng |
a numeric vector of longitudes, or a one-sided formula of the form
|
lat |
a vector of latitudes or a formula (similar to the |
layerId |
the layer id |
group |
the name of the group the newly created layers should belong to
(for |
icon |
the icon(s) for markers; |
popup |
a character vector of the HTML content for the popups (you are
recommended to escape the text using |
popupOptions |
A Vector of |
label |
a character vector of the HTML content for the labels |
labelOptions |
A Vector of |
options |
a list of extra options for markers. See
|
clusterOptions |
if not |
clusterId |
the id for the marker cluster layer |
data |
the data object from which the argument values are derived; by
default, it is the |
the new map
object
https://github.com/mapshakers/leaflet-mapkey-icon
Other Mapkey Functions:
[.leaflet_mapkey_icon_set()
,
makeMapkeyIcon()
,
mapkeyIconList()
,
mapkeyIcons()
library(leaflet)
leaflet() %>%
addTiles() %>%
addMapkeyMarkers(
data = breweries91,
icon = makeMapkeyIcon(
icon = "mapkey",
iconSize = 30,
boxShadow = FALSE,
background = "transparent"
),
group = "mapkey",
label = ~state, popup = ~village
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.