Skip to content

leaflegend

1.3.0

Add Custom Legends to 'leaflet' Maps

2packages dependsuggested by 1
324.7Kdownloads / year
95.3%test coverage
13/13flavors OK

Overview

About

Provides extensions to the 'leaflet' package to customize legends with images, text styling, orientation, sizing, and symbology and functions to create symbols to plot on maps.

Changes in 1.3.0
  • added makeSymbolText and makeSymbolTextIcons for building SVG text

symbols that can be used as 'leaflet' icons. Unlike the existing 'text'

shape in makeSymbol, these take an explicit text argument so each

symbol can show a different label. fontSize and fontFamily arguments

are exposed.

  • added addText and addTextSize as convenience wrappers analogous to

addSymbols and addSymbolsSize for placing text symbols on a map.

  • added addLegendText and addLegendTextSize for legend support of

text symbols, analogous to addLegendSymbol and addLegendSize.

addLegendText exposes both fontSize and fontFamily;

addLegendTextSize exposes only fontFamily and auto-computes

font-size from each break's width. addLegendText takes an optional

Show all changes in 1.3.0Hide the rest of the changes in 1.3.0

labels argument; by default no labels are placed beside the text symbols.

addLegendTextSize requires a single text string that is rendered at

each break size.

  • corrected the ... documentation for mapSymbols, legendSymbols, and

addLeafLegends. The grouped help pages now state which pass-through

target applies to each function in the group.

  • Fixed legends with a group not matching the state of the layers control

when the map renders inside an initially hidden container, e.g. an inactive

Quarto/bslib tab or a hidden Shiny tab (#110). Legend visibility now re-syncs

after deferred rendering completes and also responds to showGroup/

hideGroup.

  • Fixed addLegendNumeric placing ticks and labels at mirrored positions on

vertical legends so that they did not align with the color gradient when

breaks were not symmetric within the range of values (#105, #106).

  • Fixed addLegendNumeric with decreasing = TRUE not reversing the color

gradient, which left labels in the opposite order of the colors.

  • User supplied labels in addLegendNumeric now always pair with the bins

in ascending order of value for both orientations, e.g. for

bins = c(1000, 3000, 6000) and labels = c('low', 'med', 'high'), 'low'

labels the 1000 tick even when decreasing = TRUE.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.2 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK13 OK2026-05-24
Show 1 earlier changeHide 1 earlier change
  • NOTE3 OK, 11 NOTE2026-03-10
Advisories

none known

Documentation

In release 1.3.0
READMEYes · 146 wordsVignettesNoNEWSYes · 100% structured · mentions 1.3.0Citation fileYes · software entry onlyWebsiteYes · pkgdown
Help pages
6
Examples that run
100%5 run in a plain check
Exported functions with examples
83%
Documented parameters
88%
Return-value docs
100%
Help pages citing references
0%

Downloads

324.7K
CRAN downloads in the past year
Rank #715 · ~890/day · ~27.1K/mo
Daily download trend is not available in this view yet.
35.9K30 days
72.3K90 days
324.7K1 year
Compare downloads with other packages →
Also on3.9K r2u8 autocran1.9K conda_forge

Repository

38Stars
5Forks
0Open issues
0Open PRs
8Releases
257Commits
5Commit identities
rleaflet
257 commits · Last activity 2026-09-16 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
97%
Median days to close, 50 most recently updated closed issues
8
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-07-29 · 362026-07-07 · 38
PracticesBeta

10 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/tomroh/leaflegend on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)

Funding links: GitHub Sponsors

The repository owner accepts GitHub Sponsors

Docs source (2)
pkgdown

GitHub Pages site last deployed 2021-07-11

pkgdown site last built 2026-09-16

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 2 practices
CRAN release process (1)
cran-comments.md
Lint, format, editor (2)
lintrRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)

Installing leaflegend adds 50 packages (30 with compiled code, 47 MB of source tarballs). Heaviest: sf 9.3 MB, bslib 5.6 MB, sp 4.3 MB.

Depends (1)
R >= 3.3.0
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
2direct
22indirect
Imports 2
Suggested by 1
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (2)
Author, Maintainer since 0.1.0 (2021)
Contributor · added in 0.4.0
Releases (14)

Pick two releases to compare their code metrics.

  • 1.3.0Latest
    record
    2026-09-16 · current release · diff ↗ ·
    added 6 exports
    addLegendText, addLegendTextSize, addText, addTextSize, makeSymbolText, makeSymbolTextIcons
  • 1.2.8
    record
    2026-05-16 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 1.2.1
    record
    2024-05-09 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 1.2.0
    record
    2024-01-10 · diff ↗
  • 1.1.1
    record
    2023-08-19 · diff ↗
  • 1.1.0
    record
    2023-05-04 · diff ↗ ·
    added 2 exports
    availableShapes, makeSvgUri
  • R
    R 4.3.0 released · 2023-04-21
  • 1.0.0
    record
    2022-08-05 · diff ↗ ·
    removed 1 export
    makeSizeIcons
    added 4 exports
    addLegendSymbol, addSymbols, addSymbolsSize, makeSymbolsSize
  • R
    R 4.2.0 released · 2022-04-22
  • 0.6.1
    record
    2022-03-03 · diff ↗
  • 0.6.0
    record
    2022-01-17 · diff ↗ ·
    added 1 export
    addLegendLine
  • 0.5.0
    record
    2021-10-28 · diff ↗ ·
    added 1 export
    addLegendAwesomeIcon
  • 0.4.0
    record
    2021-07-23 · diff ↗
Show 5 earlier eventsHide 5 earlier events
  • 0.3.0
    record
    2021-05-21 · diff ↗ ·
    added 2 exports
    makeSizeIcons, makeSymbolIcons
  • R
    R 4.1.0 released · 2021-05-18
  • 0.2.0
    record
    2021-02-23 · diff ↗ ·
    added 3 exports
    addLegendSize, sizeBreaks, sizeNumeric
  • 0.1.0
    record
    2021-01-25
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2021-01-25
Total releases
14 / 5 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.3.0
Download size
1.3 MB

Cite

Cite this package

Run in R for the authors' entry:

citation("leaflegend")

The package provides a citation file, so citation() returns the authors' own entry.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for leaflegend version 1.3.0 [Data set]. HJJB, LLC. Data release v2026-10-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy