Releases: rstudio/leaflet
leaflet 2.2.2
-
Fixed #893: Correctly call
terra::crs()
when checking the CRS of aSpatVector
object inpointData()
orpolygonData()
(thanks @mkoohafkan, #894). -
Replace
{viridis}
dependency by{viridisLite}
(@olivroy, #897) -
addRasterImage
now takesoptions = gridOptions()
, so that arbitrary Leaflet layer options can be controlled. (#692)
leaflet 2.2.1
- When
addProviderTiles()
is used with{leaflet.providers}
version 2.0.0 or later, theleaflet-providers
HTML dependency produced can be correctly cached by knitr. When used with older versions of{leaflet.providers}
, the HTML dependency uses temp files that break knitr's caching mechanism (thanks @qdread, @jaredlander; #884).
leaflet 2.2.0
Features
-
Added support for SpatRaster and SpatVector objects from the terra package. (#728)
-
leaflet()
now uses jQuery 3.6.0 provided via the{jquerylib}
package. As a result of this change, the HTML dependencies forleaflet()
are included in thedependencies
item of the htmlwidget object it returns. (#817, #821)
Bug fixes and improvements
-
Use correct license in OpenStreetMap attribution. (#811)
-
Use
xfun::base64_uri()
for base64 encoding instead of markdown and base64enc. (#823) -
Remove dependencies on rgdal and rgeos. (#837)
-
Respect option scrollWheelZoom=FALSE. (#827)
-
Fixed #866: Correctly call
terra::has.RGB()
inaddRasterImage()
for aSpatRaster
object. (#869)
v2.1.2
v2.1.1
leaflet 2.1.1
Bug fixes and improvements
-
The default marker icon for
addMarkers
no longer worked, due to the CDN we were relying on apparently being retired. Fixed by pointing to a new CDN. (#782) -
New behavior from tile.openstreetmap.org caused
addTiles
default tileset to break when viewed under non-https protocol on recent versions of Chrome. Fixed by always using the https protocol to connect to openstreetmap. (#786)
v2.1.0
leaflet 2.1.0
Bug fixes and improvements
-
Enable JS function literals (wrapped in
htmlwidgets::JS()
) to be included in arguments to methods invoked onleafletProxy
objects. (JS function literals could already be included with methods invoked onleaflet
objects, so this change just bringsleafletProxy
to parity.) (#420) -
Add missing CSS rule to show
<img>
in right-pane and left-pane (rstudio/rmarkdown/issues#1949, #770) -
Allow for hidden but not suspended leaflet maps to queue calls (such as add raster images) until they are rendered. If a new leaflet map is created, all pending calls are removed. (#771)
v2.0.4.1
v2.0.3
leaflet 2.0.3
BREAKING CHANGES
data("providers")
anddata("providers.details")
no longer exist. Please useleaflet::providers
andleaflet::providers.details
. (#636)
BUG FIXES and IMPROVEMENTS
- Integrated data from
leaflet.providers
package. See leaflet.providers for details. (#636) - Fixed rstudio/crosstalk#58, which caused Leaflet maps that used Crosstalk shared data in Shiny apps, to be redrawn at incorrect times.
- invokeRemote() now resolves html dependencies before passing them to shiny::createWebDependency() (#620).
- Upgrade leaflet-provider to 1.4.0, enable more map variants such as CartoDB.Voyager (#567)
sf
objects withnames
attributes in thest_geometry
now visualise correctly (#595)- GeoJSON objects missing
properties
can now be displayed (#622)
v2.0.1
Features
- Added method
addMapPane
to add custom pane layers to have fine tune control over layer ordering. New feature from within leaflet.js v1.x. (#549) - Exposed htmlwidgets sizingPolicy in leaflet() (#548)
Bug Fixes and Improvements
- Default marker icon locations will now use unpkg.com instead of the leaflet cdn when using https or file protocols. (#544)
.leaflet-map-pane
z-index
switched to 'auto'. Allows for map panes to appear above the map if they appear later in the dom. (#537)- Use correct Leaflet.js scale control remove method. (#547)
- Start from world view if using flyTo or flyToBounds. (#552)
v2.0.0
leaflet 2.0.0
BREAKING CHANGES
-
Update to latest leaflet.js v1.3.1 (#453, 314616f) Please see http://leafletjs.com/reference-1.3.0.html for the latest documentation
-
All plugins updated to versions compatible with leaflet > 1.0 (#458)
- jQuery, https://github.com/jquery/jquery
- Leaflet (JavaScript library), https://github.com/Leaflet/Leaflet
- Leaflet Providers, https://github.com/leaflet-extras/leaflet-providers
- leaflet-measure, https://github.com/ljagis/leaflet-measure
- Leaflet.Terminator, https://github.com/joergdietrich/Leaflet.Terminator
- Leaflet.SimpleGraticule, https://github.com/ablakey/Leaflet.SimpleGraticule
- Leaflet.MagnifyingGlass, https://github.com/bbecquet/Leaflet.MagnifyingGlass
- Leaflet.MiniMap, https://github.com/Norkart/Leaflet-MiniMap
- Leaflet.awesome-markers, https://github.com/lvoogdt/Leaflet.awesome-markers
- Leaflet.EasyButton, https://github.com/CliffCloud/Leaflet.EasyButton/
- Proj4Leaflet, https://github.com/kartena/Proj4Leaflet
- leaflet-locationfilter, https://github.com/kajic/leaflet-locationfilter
- leaflet-omnivore, https://github.com/mapbox/leaflet-omnivore
- topojson, https://github.com/topojson/topojson
-
Leaflet.label (https://github.com/Leaflet/Leaflet.labelExtension)
L.Label
has been adopted within Leaflet.js toL.Tooltip
- Tooltips are now displayed with default Leaflet.js styling
- In custom javascript extensions, change all
*.bindLabel()
to*.bindTooltip()
BUG FIXES AND FEATURES
-
Relative protocols are used where possible when adding tiles (#526). In RStudio 1.1.x on linux and windows, a known issue of 'https://' routes fail to load, but works within browsers (rstudio/rstudio#2661).
-
Added more providers for
addProviderTiles()
: "OpenStreetMap.CH", "OpenInfraMap", "OpenInfraMap.Power", "OpenInfraMap.Telecom", "OpenInfraMap.Petroleum", "OpenInfraMap.Water", "OpenPtMap", "OpenRailwayMap", "OpenFireMap", "SafeCast". (4aea447) -
L.multiPolyline
was absorbed intoL.polyline
, which accepts multiple an array of polyline information. http://leafletjs.com/reference-1.3.0.html#polyline. (#515) -
Fix bug where icons where anchored to the top-center, not center-center (2a60751)
-
Fix bug where markers would not appear in self contained knitr files (cc79bc3)
-
leaflet-label plugin now L.tooltip in leaflet.js. labelOptions() now translates old options clickable to interactive and noHide to permanent.
-
Fix a bug where the default
addTiles()
would not work with .html files
served directly from the filesystem. -
Add
groupOptions
function. Currently the only option is letting you specify
zoom levels at which a group should be visible. -
Fix bug with accessing columns in formulas when the data source is a Crosstalk
SharedData object wrapping a spatial data frame or sf object. -
Fix strange wrapping behavior for legend, especially common for Chrome when
browser zoom level is not 100%. -
Fix incorrect opacity on NA entry in legend. (PR #425)
-
Added support for drag events (#405)
-
Ensure type safety of .indexOf(stamp) (#396)
-
validateCoords()
warns on invalid polygon data (#393) -
Added
method
argument toaddRasterImage()
to enable nearest neighbor interpolation when projecting categorical rasters (#462) -
Added an
'auto'
method foraddRasterImage()
. Projected factor results are coerced into factors. (9accc7e) -
Added
data
parameter to remainingaddXXX()
methods, including addLegend. (f273edd, #491, #485) -
Added
preferCanvas
argument toleafletOptions()
(#521)