Extra Functionality for 'leaflet' Package
Overview
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.
New Features
addGeoJSONChoropleth()/addKMLChoropleth()can vary polygon fill opacity per feature viafillOpacityProperty(property name or JS function). Passing a JS function asfillOpacityworks too. Fix #53addHeatmapandaddWebGLHeatmapnow scale intensity values so that raw weights such as 1 vs 500 stay visually distinct. UsescaleIntensity = FALSEfor the previous clipping behavior.addHeatmapalso setsmaxZoom = 0when scaling so Leaflet.heat does not fade points to blue at low zoom. NewaddHeatmapLegend()(also vialegend = TRUE) adds a color guide. Fix #126, Fix #160- Include the plugin
leaflet-groupedlayercontrol. See the example in/inst/examples/shiny/groupedlayercontrol_app.Rfor a demo of all options and methods. Fix #202 addGreatCircles()gainededitable = TRUEto drag a radius handle on the circumference (as in the Leaflet.Geodesic interactive circle demo).showStatsnow reports radius and circumference; Shiny inputMAPID_geodesic_statsincludesradius. Fix #44
Show all changes in 2.1.0Hide the rest of the changes in 2.1.0
Improvements
- Updated GitHub Actions dependencies (
actions/checkoutv6,actions/setup-nodev6,actions/cachev5,actions/upload-artifactv6,JamesIves/github-pages-deploy-action4.7.6) and the npmjs-yamllockfile (4.1.1). - Style GHA no longer runs on
pull_request(detached HEAD madegit pullfail 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 underinst/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 toraw.githubusercontent.com. Long example URLs inomnivoreandwebglheatmapdocs are wrapped to stay under the Rd 100-character limit. Thanks @ngoodkind for reporting and opening #251. Fix #250 - New argument
filtersearchforsearchOptionsto limit the Nominatim search area. Fix #168 addSearchFeaturesdisplays 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
fillColorforpulseIcons. Fix #231 - New argument
groupforaddMeasurePathToolbar. Supports single group, multiple groups, or all layers (group = NULL). Fix #233 addSearchGoogle/addReverseSearchGoogleload the Google Maps JavaScript API as an htmlDependency instead ofhtmlwidgets::appendContent(), which Shiny ignores (Ignoring appended content). The search control now appears inrenderLeaflet(). Demo:/inst/examples/shiny/search/google_app.R. Fix #112- Google and OSM search suggestions crashed or showed
undefinedbecause leaflet-search PR 339 calledformatData(control, data)instead offormatData(data). Search formatters now accept both signatures, and Google results unwrapGeocoderResponse.results. addReverseSearchGoogleno longer reads minified GoogleLatLngBoundsinternals (viewport.f/viewport.b). Bounds usegetSouthWest()/getNorthEast()(orsouth/west/north/east).addLatLngregisters vertex markers in Leaflet'smarkercategory 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
- 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
Documentation
- 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
Repository
- 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
Forks over time
Releases over time
Issues over time
- github.com/sebastien-plutniak/leaflet.extras · last recorded on 2026-09-15
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.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-17 · The repository has a site deploy workflow
pkgdown site last built 2026-09-17
Show all practicesHide 2 practices
Dependencies
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.
Code & Tests
People & History
Show 16 more contributorsHide 16 contributors
Previously maintained by Sebastien Plutniak (2.0.2) and Sebastian Gatscha (2.0.0 to 2.0.1).
Pick two releases to compare their code metrics.
- 2.1.0Latest
- RR 4.6.0 released · 2026-04-24
- unarchivedReturned to CRAN2026-03-29
- 2.0.22026-03-29 · diff ↗ ·
added 6 exports
addGroupedBaseLayer, addGroupedLayersControl, addGroupedOverlay, groupedLayersControlOptions, removeGroupedLayersControl, removeGroupedOverlay - archivedRemoved from CRAN2026-02-19issues were not corrected in time
- RR 4.5.0 released · 2025-04-11
- 2.0.1
- 2.0.02024-06-10 · diff ↗ ·
added 6 exports
addLatLng, clearSearchFeatures, clearSearchOSM, handlersOptions, searchOSMText, toolbarOptions - RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- 1.0.02018-04-21 · diff ↗ ·
removed 3 exports
addSearchMarker, searchMarkersOptions, searchOSMOptionsadded 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.22017-06-25
- RR 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")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.
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.