Produces a PNG file that can be used as a screen overlay --- legend bar for numeric and factor type variables.
kml_legend.bar(x, width, height, pointsize = 14, legend.file, legend.pal,
z.lim = range(x, na.rm=TRUE, finite=TRUE), factor.labels, png.type)
numeric or factor-type vector
numeric; (optional) width of image in pixels
numeric; (optional) height of image in pixels
numeric; point size for the plot
PNG file name
character; color palette
numeric; lower and upper limits
character; class names if applicable
character; PNG type
When exporting raster layers to KML the legend bar is generated by default. If the width and height are not provided, the function will try to estimate them automatically.
grDevices::png
, kml-methods
, kml_layer