leaflet 1.1.0
This article is originally published at https://www.rstudio.com/blog/
Leaflet 1.1.0 is now available on CRAN! The Leaflet package is a tidy wrapper for the Leaflet.js mapping library, and makes it incredibly easy to generate interactive maps based on spatial data you have in R.
This release was nearly a year in the making, and includes many important new features.
Easily add textual labels on markers, polygons, etc., either on hover or statically
Highlight polygons, lines, circles, and rectangles on hover
Markers can now be configured with a variety of colors and icons, via integration with Leaflet.awesome-markers
Built-in support for many types of objects from
[sf](https://cran.r-project.org/web/packages/sf/index.html)
, a new way of representing spatial data in R (all basicsf
/sfc
/sfg
types exceptMULTIPOINT
andGEOMETRYCOLLECTION
are directly supported)Projections other than Web Mercator are now supported via Proj4Leaflet
Color palette functions now natively support viridis palettes; use
"viridis"
,"magma"
,"inferno"
, or"plasma"
as the palette argumentDiscrete color palette functions (
colorBin
,colorQuantile
, andcolorFactor
) work much better with color brewer palettesIntegration with several Leaflet.js utility plugins
Data with
NA
points or zero rows no longer causes errorsSupport for linked brushing and filtering, via Crosstalk (more about this to come in another blog post)
Many thanks to @bhaskarvk who contributed much of the code for this release.
Going forward, our intention is to prevent any more Leaflet.js plugins from accreting in the core leaflet package. Instead, we have made it possible to write 3rd party R packages that extend leaflet (though the process to do this is not documented yet). In the meantime, Bhaskar has started developing his own leaflet.extras package; it already supports several plugins, for everything from animated markers to heatmaps.
Thanks for visiting r-craft.org
This article is originally published at https://www.rstudio.com/blog/
Please visit source website for post related comments.