Changelog
Source:NEWS.md
leaflegend 1.2.1
CRAN release: 2024-05-09
-
addLegendNumeric
now has the ability to use manual tick breaks and labels when thebins
argument is a numeric vector greater than length 1. This only applies to vertically oriented legends.
leaflegend 1.2.0
CRAN release: 2024-01-10
addLegendNumeric
gainslabelStyle
argument and significant improvements to the layout that will handle larger font sizes and long text widths.added
stacked
argument toaddLegendSize
to allow size legends that are more compact when symbols are overlayed. See examples in?addLegendSize
.groups can now have underscores in their name for show/hide functionality.
added
between
argument toaddLegendBin
andaddLegendQuantile
so that users can change the dash.fixed issue where
addSymbols
andaddSymbolsSize
only worked when directly specifyinglat
andlng
. These now work for sf objects.added
dashArray
argument for symbols functions. The main purpose is to allow dashed line encodings, but all symbols can have dashed outer lines.
leaflegend 1.1.1
CRAN release: 2023-08-19
updating test for ‘leaflet’ changes in v2.2.0
pch solid symbols 15-20 will use
color
iffillColor
is missing
leaflegend 1.1.0
CRAN release: 2023-05-04
availableShapes
is provided for convenience to look up supported symbol names.addLegendFactor
,addLegendBin
, andaddLegendQuantile
will now show a symbol for missing values if they exist and gain thenaLabel
argument.Label spacing adjustments for
addLegendNumeric
which should support longer labels.addLegendNumeric
gains an argumentnaLabel
and now shows the NA color when there are missing values.addLegendNumeric
gains an argumentlabels
which allows the user to pass label names for numeric breaks.The
breaks
argument inaddLegendLine
andaddLegendSize
now allows the user to pass a named list where the names are the labels.makeSymbol
andmakeSymbolIcons
can now create map symbols that are consistent with base Rpch
. Theshape
argument can accept the name or an integer (0-indexed).availableShapes
provides a list of named options.
leaflegend 1.0.0
CRAN release: 2022-08-05
A new function
addLegendSymbol
has been added to automatically encode character/factors as various map symbols.The default argument for
baseSize
inaddLegendSize
has been changed to 20.values
argument is no longer used byaddLegendBin
since it is not necessary and causes problems when number of values is less than the number of bins.Updated example in README
Documentation has been updated for
makeSymbols
and the name has been changed tomapSymbols
with some additional functions added to it.Internal functions have been renamed to match naming conventions.
Renamed
makeSizeIcons
tomakeSymbolsSize
to be consistent in naming conventions. ThecolorValues
argument has been removed. For the same functionality, specify a vector ofcolor
andfillColor
.Fixed issue with image styling missing for raster images in
addLegendImage
Added functions to automate the task of creating map symbols.
addSymbols
will create map symbols based on a character or factor vector.addSymbolsSize
will create map symbols with a size encoding.Code re-factoring for
addLegendBin
,addLegendQuantile
, andaddLegendFactor
as grouping of values for each is different but the assembly of the HTML is the same.Unit tests have been added to cover all the current functions.
Gradient IDs for numeric legends are now based on the function call or data “name” in
values
.makeSizeIcons
default opacity is now 1.Adding internal functions to add dependencies for
addLegendAwesomeIcon
. Awesome Icons would not show in legends because the needed HTML dependencies were not loaded unlessaddAwesomeIcons
was included.addLegendAwesomeIcon
will now check if the dependencies are in the “leaflet” map and include them if missing.Added error messages for invalid
width
,height
,tickWidth
,tickLength
, andstrokeWidth
arguments. Prior to this negative values would not throw errors and the visual output of legends was not desirable.Ability to specify
values
parameter as a formula to retrieve from thedata
argument which is the same as the “leaflet” package.makeSymbolIcons
now supports vectorization for multiple shape argumentsAwesome icons are now centered in a marker in
addLegendAwesomeIcon
adding support for
text
parameter passed toaddLegendAwesomeIcon
. This allows an svg to be passed to as an icon.
leaflegend 0.6.1
CRAN release: 2022-03-03
patching examples that use png files from leaflet js site since they have moved.
adding leaf images png files for examples
leaflegend 0.6.0
CRAN release: 2022-01-17
updated layers control to handle special characters in group name. All non-alphanumeric characters are removed from the class names and javascript selectors.
added better error message for missing color and pal
adding
addLegendLine
to add height only encoding of size based on values
leaflegend 0.5.0
CRAN release: 2021-10-28
updated example in README
adding addLegendAwesomeIcon function to produce legends with markers from awesome icon libraries
adding in line and polygon symbol and adding symbols to the README
leaflegend 0.4.0
CRAN release: 2021-07-23
fixes error on makeSizeLegend where fillColor is not evaluated if no argument is provided
adding colorValues as an argument to makeSizeLegend so that symbols can be sized and colored on different vectors of data
fixes warning on addLegendNumeric where the shape default was a vector not a single value
adding number formatting to addSizeLegend
adding group layer support for legends. Use addLayersControl to turn on/off legends
added example for using raster images with size encodings based on data
leaflegend 0.3.0
CRAN release: 2021-05-21
stroke outlines of shapes are now padded so that the stroke is not cut off
numeric legends now have appropriate sizing for text
star symbol outline has been fixed
new function
makeSizeIcons
as a convenience wrapper size scaled symbols
leaflegend 0.2.0
CRAN release: 2021-02-23
new functions
addLegendSize
,sizeNumeric
, andsizeBreaks
were added to allow encoding size on symbols.addLegendImage
supports multiple height and width parameters for images where you want different sizesaddLegendImage
now supports using an svg URI from the output ofmakeSymbol
. To supply a custom svg URI, add the ‘svgURI’ class to the character vector.added more shapes to
makeSymbol
,addLegendNumeric
,addLegendQuantile
,addLegendFactor
,addLegendBin
Control the opacity of the legend shapes for
addLegendNumeric
,addLegendQuantile
,addLegendFactor
,addLegendBin
makeSymbol
now returns embeddable svg