Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tmap_icons

Specify icons


Description

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,
  width = 48,
  height = 48,
  keep.asp = TRUE,
  just = c("center", "center"),
  as.local = TRUE,
  ...
)

marker_icon()

Arguments

file

character value/vector containing the file path(s) or url(s).

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 TRUE and the aspect ratio differs from width/height either width or height is 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 of just is c("center", "center").

as.local

if the file is a url, should it be saved to local temporary file?

...

arguments passed on to icons. When iconWidth, iconHeight, iconAnchorX and iconAnchorY are specified, they override width and height, and just.

Value

icon data (see icons)

See Also


tmap

Thematic Maps

v3.3-1
GPL-3
Authors
Martijn Tennekes [aut, cre], Jakub Nowosad [ctb], Joel Gombin [ctb], Sebastian Jeworutzki [ctb], Kent Russell [ctb], Richard Zijdeman [ctb], John Clouse [ctb], Robin Lovelace [ctb], Jannes Muenchow [ctb]
Initial release
2021-03-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.