Skip to content

leaflet.extras

2.1.0Package record

Extra Functionality for 'leaflet' Package

2packages dependsuggested by 8
55Kdownloads / year
98.0%test coverage
13/13flavors OK

Overview

About

The 'leaflet' JavaScript library provides many plugins some of which are available in the core 'leaflet' package, but there are many more. It is not possible to support them all in the core 'leaflet' package. This package serves as an add-on to the 'leaflet' package by providing extra functionality via 'leaflet' plugins.

Changes in 2.1.0

New Features

  • addGeoJSONChoropleth() / addKMLChoropleth() can vary polygon fill opacity per feature via fillOpacityProperty (property name or JS function). Passing a JS function as fillOpacity works too. Fix #53
  • addHeatmap and addWebGLHeatmap now scale intensity values so that raw weights such as 1 vs 500 stay visually distinct. Use scaleIntensity = FALSE for the previous clipping behavior. addHeatmap also sets maxZoom = 0 when scaling so Leaflet.heat does not fade points to blue at low zoom. New addHeatmapLegend() (also via legend = TRUE) adds a color guide. Fix #126, Fix #160
  • Include the plugin leaflet-groupedlayercontrol. See the example in /inst/examples/shiny/groupedlayercontrol_app.R for a demo of all options and methods. Fix #202
  • addGreatCircles() gained editable = TRUE to drag a radius handle on the circumference (as in the Leaflet.Geodesic interactive circle demo). showStats now reports radius and circumference; Shiny input MAPID_geodesic_stats includes radius. Fix #44
Show all changes in 2.1.0Hide the rest of the changes in 2.1.0

Improvements

  • Updated GitHub Actions dependencies (actions/checkout v6, actions/setup-node v6, actions/cache v5, actions/upload-artifact v6, JamesIves/github-pages-deploy-action 4.7.6) and the npm js-yaml lockfile (4.1.1).
  • Style GHA no longer runs on pull_request (detached HEAD made git pull fail after auto-commits). It now runs on push to the branch instead.
  • pkgdown reference index includes addHeatmapLegend.

Bugfixes

  • Rd examples no longer download GeoJSON from GitHub during R CMD check --as-cran (--run-donttest). CI failed with HTTP 429 (rate limit) on ubuntu-latest/oldrel-1. Examples now use local fixtures under inst/examples/data/geojson/.
  • Tests no longer download example GeoJSON/TopoJSON from the defunct rawgit.com service. CRAN checks failed because those URLs were unreachable (test-geojson_mini.R, test-heatmaps.R). Local fixtures are used instead, and remaining rawgit links in examples/docs now point to raw.githubusercontent.com. Long example URLs in omnivore and webglheatmap docs are wrapped to stay under the Rd 100-character limit. Thanks @ngoodkind for reporting and opening #251. Fix #250
  • New argument filtersearch for searchOptions to limit the Nominatim search area. Fix #168
  • addSearchFeatures displays all matching results, even in the case of duplicates. However, markers and animations are currently only applied to a single result and not to all matching entries. Fix #150
  • New argument fillColor for pulseIcons. Fix #231
  • New argument group for addMeasurePathToolbar. Supports single group, multiple groups, or all layers (group = NULL). Fix #233
  • addSearchGoogle / addReverseSearchGoogle load the Google Maps JavaScript API as an htmlDependency instead of htmlwidgets::appendContent(), which Shiny ignores (Ignoring appended content). The search control now appears in renderLeaflet(). Demo: /inst/examples/shiny/search/google_app.R. Fix #112
  • Google and OSM search suggestions crashed or showed undefined because leaflet-search PR 339 called formatData(control, data) instead of formatData(data). Search formatters now accept both signatures, and Google results unwrap GeocoderResponse.results.
  • addReverseSearchGoogle no longer reads minified Google LatLngBounds internals (viewport.f / viewport.b). Bounds use getSouthWest() / getNorthEast() (or south/west/north/east).
  • addLatLng registers vertex markers in Leaflet's marker category with the geodesic's group and a unique layer id, and removes them when the line is deleted (removeShape / clearShapes / clearGroup). Hide/show by group still keeps them.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.8 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-09-27
  • ERROR12 OK, 1 ERROR2026-09-26
  • OK13 OK2026-08-21
  • ERROR12 OK, 1 ERROR2026-08-17
  • OK13 OK2026-08-05
Show 4 earlier changesHide 4 earlier changes
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-04-15
  • ERROR13 OK, 1 ERROR2026-04-12
  • OK8 OK2026-03-30
Advisories

none known

Documentation

In release 2.1.0
README· In the repository, left out of the releaseVignettesNoNEWSYes · 100% structured · mentions 2.1.0Citation fileNoWebsiteYes · pkgdown
Help pages
36 (1 internal)includes a package overview page
Examples that run
83%19 run in a plain check · 2 only when donttest examples are enabled (R CMD check --as-cran) · 2 never run
Exported functions with examples
66%
Documented parameters
87%
Return-value docs
6%
Help pages citing references
0%

Downloads

55K
CRAN downloads in the past year
Rank #1,347 · ~151/day · ~4.6K/mo
Daily download trend is not available in this view yet.
7.6K30 days
21K90 days
55K1 year
Compare downloads with other packages →
Also on853 r2u7 autocran4.6K conda_forge153 c2d4u

Repository

224Stars
80Forks
12Open issues
8Open PRs
5Releases
522Commits
13Commit identities
rstatsleafletdata-visualizationgeospatial
License file reads as GPL-3.0 · 522 commits · Last activity 2026-09-17 · +0.4% stars, 30d · Default branch at 2.1.0.9000, ahead of CRAN 2.1.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
50%
Median days to close, 50 most recently updated closed issues
1,868
Median days to close, 50 most recently updated closed PRs
42

Stars over time

2026-09-16 · 2232026-09-25 · 224
Earlier repositories
PracticesBeta

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

Checks run against github.com/trafficonese/leaflet.extras on 2026-10-18.

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)
Code of conductIssue templates
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-17 · The repository has a site deploy workflow

pkgdown site last built 2026-09-17

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

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)

Installing leaflet.extras adds 53 packages (32 with compiled code, 59 MB of source tarballs). Heaviest: stringi 11 MB, sf 9.3 MB, bslib 5.6 MB.

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

People & History

People (27)
Author, Maintainer since 2.1.0 (2026) · added in 2.0.0
Author · added in 1.0.0
Contributor, Copyright holder · added in 1.0.0
leaflet.heat library
Contributor, Copyright holder · added in 1.0.0
topojson library
Contributor, Copyright holder · added in 1.0.0
leaflet-sleep library
Contributor, Copyright holder · added in 1.0.0
leaflet-gps library; leaflet-search library
Contributor · added in 1.0.0
Fixes for Draw Options
Contributor · added in 1.0.0
Bounce Marker addition
Contributor, Copyright holder · added in 1.0.0
leaflet-fullscreen library
Contributor, Copyright holder · added in 1.0.0
leaflet.BounceMarker library
Show 16 more contributorsHide 16 contributors
Contributor, Copyright holder · added in 1.0.0
pouchdb-browser library
Contributor, Copyright holder · added in 1.0.0
leaflet-draw library
Contributor, Copyright holder · added in 1.0.0
leaflet-measure-path library
Contributor, Copyright holder · added in 1.0.0
leaflet-omnivore, csv2geojson, and togeojson libraries
Contributor, Copyright holder · added in 1.0.0
leaflet-draw-drag library
Contributor, Copyright holder · added in 1.0.0
leaflet.tilelayer.pouchdbcached library
Contributor, Copyright holder · added in 1.0.0
fuse.js library
Contributor, Copyright holder · added in 1.0.0
leaflet-hash library
Contributor, Copyright holder · added in 1.0.0
leaflet-plugins library
Contributor, Copyright holder · added in 1.0.0
Leaflet.Geodesic library
Contributor, Copyright holder · added in 1.0.0
leaflet-webgl-heatmap library
Contributor · added in 1.0.0
Enhancements for Draw Options
Contributor, Copyright holder · added in 1.0.0
Leaflet.StyleEditor library
Contributor, Copyright holder · added in 1.0.0
leaflet-choropleth library
Contributor, Copyright holder · added in 1.0.0
leaflet-pulse-icon library
Contributor
Leaflet-search and Leaflet-GPS plugin integration

Previously maintained by Sebastien Plutniak (2.0.2) and Sebastian Gatscha (2.0.0 to 2.0.1).

Listed in earlier versions (1)
no longer listed · 2.0.2
Releases (6)

Pick two releases to compare their code metrics.

  • 2.1.0Latest
    record
    2026-09-16 · current release · diff ↗ ·
    added 1 export
    addHeatmapLegend
  • R
    R 4.6.0 released · 2026-04-24
  • unarchivedReturned to CRAN
    2026-03-29
  • 2.0.2
    record
    2026-03-29 · diff ↗ ·
    added 6 exports
    addGroupedBaseLayer, addGroupedLayersControl, addGroupedOverlay, groupedLayersControlOptions, removeGroupedLayersControl, removeGroupedOverlay
  • archivedRemoved from CRAN
    2026-02-19
    issues were not corrected in time
  • R
    R 4.5.0 released · 2025-04-11
  • 2.0.1
    record
    2024-08-19 · diff ↗ ·
    added 2 exports
    edithandlersOptions, edittoolbarOptions
  • 2.0.0
    record
    2024-06-10 · diff ↗ ·
    added 6 exports
    addLatLng, clearSearchFeatures, clearSearchOSM, handlersOptions, searchOSMText, toolbarOptions
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 1.0.0
    record
    2018-04-21 · diff ↗ ·
    removed 3 exports
    addSearchMarker, searchMarkersOptions, searchOSMOptions
    added 15 exports
    addBingTiles, addBounceMarkers, addResetMapButton, addReverseSearchGoogle, addReverseSearchOSM, addSearchFeatures, addSearchGoogle, addSearchUSCensusBureau, debugMap, drawCircleMarkerOptions, removeSearchFeatures, removeSearchGoogle, removeSearchOSM, removeSearchUSCensusBureau, searchFeaturesOptions
Show 2 earlier eventsHide 2 earlier events
  • 0.2
    record
    2017-06-25
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2017-06-25
Total releases
6 / 9 yrs
License
GPL-3 | file LICENSE OSI
Minimum R
≥ 3.1.0
Download size
1.3 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("leaflet.extras")
Gatscha, S., Agafonkin, V., Bostock, M., CliffCloud, , Cudini, S., Cudini, S., Cura, R., Dumke, M., Firebaugh, J., Hadjinlian, M., Harvey, D., Karambelkar, B., Leaflet, , Liedman, P., Mapbox, , Milevski, A., Ortega, I. S., Risk, K., Rudolph, J., Schloerke, B., Shramov, P., Thasler, H., Ursudio, , Voge, M., Wilhelm, D., Wisniewski, T., Zavadil, F., & Zheng, B. (2026). leaflet.extras: Extra Functionality for 'leaflet' Package (Version 2.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.leaflet.extras

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

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 leaflet.extras version 2.1.0 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, 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