Skip to contents

leaflet.extras (development version)

leaflet.extras 2.1.0

CRAN release: 2026-09-16

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

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.

leaflet.extras 2.0.1

CRAN release: 2024-08-19

New Features

  • addWMSLegend gained the arguments title, titleStyle and titleClass to . Fix #219
  • addDrawToolbar gained the arguments edittoolbar and edithandlers, which let’s you customize all the tooltips

Bugfixes

  • Fixed CRAN devel checks: Found the following Rd file(s) with Rd targets missing package

leaflet.extras 2.0.0

CRAN release: 2024-06-10

New Features

  • addDrawToolbar offers some new options:
    • handlersOptions and toolbarOptions, with which you can customize the drawing toolbar and the tooltips
    • addDrawToolbar got a new argument drag. When set to TRUE, the drawn features will be draggable during editing, utilizing the Leaflet.Draw.Drag plugin. Otherwise, this library will not be included. Fix #115
  • searchOSMText enables setting the OpenStreetMap (OSM) search text directly from R
  • clearSearchOSM allows clearing the search marker associated with addSearchOSM. Fix #158, Fix #209
  • clearSearchFeatures provides functionality to clear the search marker
  • addReverseSearchOSM gained new arguments:
    • marker allows customization of the icon for the found feature
    • showFeatureOptions enables styling options for the found feature
    • showBoundsOptions allows customization of the style for the boundary of a found feature
    • showHighlightOptions enables customization of the hover effect for a found feature
  • addBounceMarkers behave now like normal Markers (except for clustering)
  • Update Geodesics functions to show default or custom statistics in Control Info, show (draggable) Markers, use layerManager, enable popup/label/markerOptions/highlightOptions, emit Mouse Events, accept icons.
  • addLatLng for addGeodesicPolylines allows you to append line vertices
  • Emit mouse events (click, mouseover, and mouseout) for drawn features. The event names are suffixed with identifiers based on the layercategory, appended with _draw_click, _draw_mouseover, or _draw_mouseout. The layercategory should be either shape, polyline, or marker. (Thanks to @cmcaine) See examples/shiny/draw-events/draw_mouse_events.R

Improvements

  • The apikey of addSearchGoogle / addReverseSearchGoogle / addBingTiles now has to be not NULL and also not ""
  • Extend BingTiles imagerySet and emit warnings for deprecated sets
  • Changed default values in searchOptions for url / propertyLoc / propertyName
  • Draw events trigger correctly using priority: "event". Fix #89
  • Included 12 color gradients from colorbrewer2 for addWebGLHeatmap using this script /scripts/generate_color_gradients.R
  • In addReverseSearchOSM, longitudes are now normalized to ensure that the Nominatim search returns features for wrapped tiles.
  • Updated most JavaScript dependencies, changed Webpack Build, removed source-maps as package size was an R-CMD-check issue
  • Include Tests for R functions
  • Use Github Actions (R-CMD-check, pkgdown, test-coverage, NPM builds, Styler, PR-commands)
  • Fixed & extended examples

Bugfixes

leaflet.extras 1.0.0

CRAN release: 2018-04-21

leaflet.js

leaflet-omnivore

  • Leaflet.label has updated to v1.x of leaflet.js changing default behavior. Mainly… “bindLabel, openLabel and so should be replaced by bindTooltip, openTooltip, etc”.

New Features

Improvements

  • Major Changes to search

leaflet.extras 0.2

CRAN release: 2017-06-25

Bug Fixes

leaflet.extras 0.1.9009

Bug Fixes

  • Fixed #61 by merging #62 (Thanks @RCura!)
  • Upgraded Draw Plugin now supports clearing all features. Fixes #55.

leaflet.extras 0.1.9008

New Features

  • Another option for heatmaps via Leaflet.heat
  • Also fixed gradientTexture option of WebGLHeatmap.

leaflet.extras 0.1.9007

New Features

leaflet.extras 0.1.9006

Improvements

  • Major performance boost to addWebGLHeatmap function. Closes #42.

leaflet.extras 0.1.9004

New Features

leaflet.extras 0.1.9003

New Features

leaflet.extras 0.1.9002

New Features

leaflet.extras 0.1.9001

New Features

  • Switched to x.y.zzzz naming for the package version.
  • Added support for editing existing shapes with the draw toobar.

leaflet.extras 0.1.9

New Features

leaflet.extras 0.1.8

New Features

  • Added support for GPX Files

Improvements

  • Streamlined entire GeoJSON handling code
  • Now you can add GeoJSON/TopoJSON/GPX/KML/CSV point and polygon data.

leaflet.extras 0.1.7

New Features

  • Added support for automatic legend with bi-directional highlighting to Choropleths.

leaflet.extras 0.1.6

New Features

  • Added KML/CSV support and more examples of handling geojson/topojson/kml data.

leaflet.extras 0.1.5

New Features

  • Added addGeoJSONv2 for better GeoJSON support.

Improvements

  • Refactored GeoJSON/TopoJSON Chropleths.

leaflet.extras 0.1.4

New Features

  • Added addTopoJSONChoropleth (Thanks TrantorM).

Improvements

  • GeoJSON/TopoJSON Choropleth now accepts popupOptions, labelOptions, and highlightOptions.

leaflet.extras 0.1.3

New Features

leaflet.extras 0.1.2

New Features

leaflet.extras 0.1.1

New Features

leaflet.extras 0.1.0

New Features