← Back to all sparks
L

leaflet

ANALYTICS
Velocity0.0

Create interactive maps in R using the Leaflet JavaScript library

leaflet relicensed to MIT and finished migrating off R's retired spatial stack

mappinggeospatialsf-migrationlicensingdependencies
Current state
leaflet is the R binding for the Leaflet mapping library. Its recent releases are dominated by one long migration: away from sp, rgdal, rgeos and raster, and toward sf and terra. Version 2.2.3 completed the user-facing half of that - sp is no longer installed by default, and bundled datasets ship as sf objects - while also relicensing the package from GPL-2 to MIT.
Where it's heading
This is a package being brought into line with an ecosystem that changed underneath it. The retirement of rgdal and rgeos forced the terra and sf work; the license change and dependency reductions are the maintainers taking the opportunity to clean up while they are already in there. Feature work, such as the full viridisLite palette set, arrives as a side effect of the tidying.
Prediction
With the sp path now opt-in and the retired geospatial dependencies gone, expect the remaining work to be small: palette and provider-tile handling, and keeping the bundled JavaScript current.

Recent moves

  1. 11mo ago

    MIT relicensing and sp dropped from default installs

    ⚡ SPARK

    Two changes that both alter the terms of using leaflet rather than what it draws: the license moves from GPL-2 to MIT, and sp stops being installed by default, with objects converted to sf internally instead. It is the endpoint of the migration that 2.2.0 began by adding terra support and removing rgdal and rgeos.

    View source ↗
  2. 2y ago

    terra CRS handling fixed; raster images accept layer options

    Follow-up correctness for the terra support added in 2.2.0, plus addRasterImage() gaining gridOptions() so arbitrary Leaflet layer options can be set. Swapping the viridis dependency for viridisLite continues the dependency slimming.

    View source ↗
  3. 2y ago

    Provider tile dependency is cacheable by knitr again

    With newer leaflet.providers versions the HTML dependency no longer uses temp files, so knitr can cache documents containing provider tiles. A narrow fix for people rendering reports.

    View source ↗
  4. 2y ago

    Adds terra support and removes rgdal and rgeos

    The release that started the migration: SpatRaster and SpatVector objects from terra are supported, and the dependencies on the now-retired rgdal and rgeos are removed. jQuery moves to jquerylib so the widget carries its own dependencies explicitly.

    View source ↗
  5. 3y ago

    Updates proj4.js and fixes examples to stay on CRAN

    A bundled proj4.js update plus the minimum example and documentation tweaks needed to remain on CRAN. Housekeeping ahead of the 2.2 line's real work.

    View source ↗