Specifies icons from a png images, which can be used as markers in thematic maps.
The function marker_icon() is the specification of the default marker.
Usage
tmap_icons(
file,
names = NULL,
width = 48,
height = 48,
keep.asp = TRUE,
just = c("center", "center"),
merge = NA,
as.local = TRUE,
...
)
marker_icon()Arguments
- file
character value/vector containing the file path(s) or url(s).
- names
names to be given to the icons. Useful when icons are assigned to factor levels.
- width
width of the icon. If
keep.asp, this is interpreted as the maximum width.- height
height of the icon. If
keep.asp, this is interpreted as the maximum height.- keep.asp
keep the aspect ratio of the png image. If
TRUEand the aspect ratio differs fromwidth/height, eitherwidthorheightis adjusted accordingly.- just
justification of the icons relative to the point coordinates. The first value specifies horizontal and the second value vertical justification. Possible values are:
"left","right","center","bottom", and"top". Numeric values of 0 specify left alignment and 1 right alignment. The default value ofjustisc("center", "center").- merge
merge icons to one icon list (see return value)? If
FALSE, a list is created per file. By defaultTRUE, unlessnamesare specified.- as.local
if the
fileis a url, should it be saved to local temporary file?- ...
arguments passed on to
leaflet::icons(). WheniconWidth,iconHeight,iconAnchorX, andiconAnchorYare specified, they overridewidthandheight, andjust.
Value
icon data (see leaflet::icons())
