Closed mtennekes closed 4 weeks ago
use.WebGL
mode working with dev-version of leafgl
https://github.com/r-spatial/leafgl/issues/98
Also tmapGridSymbols
needs improvement. Especially combining shape numbers and grobs/icons
Work-in-progress.
Toy example that already works:
library(grid)
custom_symbol = grobTree(circleGrob(r = unit(.5, "lines"), gp = gpar(fill = "brown")),
rectGrob(width = unit(.5, "lines"), height = unit(.5, "lines"), gp = gpar(fill = "red")))
tm_shape(World) +
tm_polygons(fill = "grey98") +
tm_symbols(shape = "income_grp",
fill = "income_grp",
fill.scale = tm_scale_categorical(values = c("purple", "steelblue", "forestgreen", "gold", "brown")),
fill.legend = tm_legend_combine("shape"),
shape.scale = tm_scale_categorical(values = list(22,21,23,24, custom_symbol)))
(in autoCRS branch, need to merge with main)
webGL improved, by default enabled (if no visual variables are specified that are unsupported for WebGL, e.g. line type).
Only problem is that lines are not sharp when webGL enabled
Slow because makeSymbols2 makes a symbol for each row, rather than each unique row.
Not working. Only tested in autoCRS branch.