Releases: Leaflet/Leaflet
v1.1.0
1.1.0 is a feature release. Changes since 1.0.3 are:
API changes
- Add deprecation notice for
L.Mixin.Events
, fixes #5358 (#5365) (by perliedman) - Turn
nonBubblingEvents
into a documented boolean option (#4883 by IvanSanchez) - Add
L.transformation
factory, allow creation from array (#5282 by anetz89) toGeoJSON
methods now default to a precision of six decimals (as recommended in the GeoJSON spec), precision is settable through a method parameter (#5544 by mattgrande)
Docs & Web Site
reference.html
now always points to latest stable docs (#5490 by IvanSanchez, #5493 by alyhegazy)- Subresource integrity information and scripts (#5468 by IvanSanchez)
- New tutorial on zooming (by IvanSanchez, #5007)
- Minor documentation improvements by perliedman, veltman, FDMS, ghybs, RichardLitt, gatsbimantico, daturkel, jgravois, geografa, BjoernSchilberg, IvanSanchez, bozdoz, zemadz, danzel, jieter, massic80, jjimenezshaw, hnrchrdl and RayBB
ES6 / Rollup
- ES6 modules & Rollup (#4989) (by mourner and IvanSanchez)
- Additional fixes, testing and cleanup of ES6 code by thachhoang, danzel, jkuebart, simon04, perliedman, luiscamachopt and Trufi (#5373, #5417, #5351, #5330, #5329, #5489, #5504, #5456, #5463)
Improvements
- Add new class
L.VideoOverlay
(#4988 by IvanSanchez) - Added z-index support to ImageOverlay (#5418 by Saulzi)
- Added error event to
ImageOverlay
layer and added tests for the new (#5416 by Saulzi) - Add
className
option forImageOverlay
(#5555 by perliedman)
Bug fixes
- Handle edge case of empty bounds on
_getBoundsCenterZoom
(#5157 by IvanSanchez) - Add new methods to
L.Bounds
for 2 missing corners, fixes #5475 (#5488 by ghybs) - Handle
Polyline
s with empty array ofLatLng
s, #5497 (#5498, by perliedman) - Take
devicePixelRatio
into account for scrollwheel zoom in win10+chrome (#5480) (by IvanSanchez) - Add hook points to allow for a proper NoGap plugin (#5476) (by IvanSanchez)
- Sanity check to prevent loading tiles when bounds are
Infinity
(#5478, #5479 by IvanSanchez) - Fix box zoom race condition (#5452 by ppaskaris)
- On update set current tiles active to avoid pruning (#5381) (#5431 by oliverheilig)
- Make
L.Mixin.Events
a simple object instead of a prototype so it doesn't have a 'constructor' property, fixes #5451 (#5453 by luiscamachopt) - Canvas: call
ctx.setLineDash
in_fillStroke
#5182 (#5454 by TeXitoi) - Only rearrange DOM in
toFront
/toBack
if needed, fixes #4050 (#5465 by perliedman) - Push back keyboard navigation order of
L.Popup
's close button (#5461 by Mirodil) - Remove spurious check in
DomUtil.preventOutline
(#5435 by qjas) - Error handler in
ImageOverlay
for 404 links (#5307) by APwhitehat) - Ensure renderer's container is initialized when a path is added to map (#5404 by IvanSanchez)
- Layers Control only add layer events to layers when we are on the map. Fixes #5421 (#5422 by danzel)
- Layers Control can now become scrollable even if
collapsed: false
, fixes #5328 (#5348 by ghybs) - Stop map on drag start instead of pointer down, fixes #5350 (#5378 by perliedman)
- fix invalid GeoJSON produced by nested
LayerGroups
(#5359 by Resonance1584) - Update toolbar inner border radius (#5361 by newmanw)
- Export
lastId
inUtil
(#5349 by DenisCarriere) - Do not stop keypress on escape if no popup is open, plus unit tests (#5331 (by IvanSanchez)
- Docs: remove
iframe
borders on examples (#5327) (by tariqksoliman) - Pull
min
/maxNativeZoom
fromTileLayer
intoGridLayer
, as per #5316. (#5319 by jkuebart) - Disable click propagation on zoom control buttons, fixes #5308 (#5318 by perliedman)
- Add CSS for
-webkit-tap-highlight-color
, fixes #5302 (#5303 by IvanSanchez) - Removed type attribute in HTML5 files (#5309 by uzerus)
- Add margin to
LatLngBounds.equals
method (#5071 by miguelcobain) - Add
L.Draggable
options and fix docstring (#5301 by IvanSanchez) - Fix max/min calculation for
getBoundsZoom
, fixes #5136 (#5137 by IvanSanchez) - Scrubbing of detached DOM elements, prevents memory leaks; fixes #5263 (#5265 by IvanSanchez)
- Remove
marker.dragging
when not on...
v1.0.3
Leaflet 1.0.3 is a bugfix release. Changes since 1.0.2:
Bug fixes
- Avoid extra
L.Canvas
redraws on several scenarios (by @perliedman, #5250, also thanks to @manubb for investigation and PR). - Fix behaviour of
dblclick
events in Chrome 55 due toPointerEvent
s (by @IvanSanchez, #5185, #5248, #5268). - Fix a dangling comma making IE8 fail to parse the code (by @batje, #5270).
- Backport event handling fixes from #5054 into
L.SVG.VML
for IE8 (by @IvanSanchez, #5215). - Fix a race condition when closing popups during their
popupopen
event (by @hagai26, #5202). - Fix
getBoundsZoom
return value on CRSs with a flipped axis (by @computerlove, #5204). - Avoid infinite loops when the
errorTileUrl
of aL.TileLayer
returns 404 (by @IvanSanchez, #5177). - Remove erroneous initialization of unused event listeners (by @Brikky, #5160).
- Fix rounding of
L.Canvas
redraw areas to avoid artifacts during partial updates (by @Ernie23, #5148). - Fix
isPopupOpen()
behaviour ofL.Layer
when no popup is bound to a layer (by @gvangool, #5106). - Add a sanity check in
LatLngBounds.contains()
to allow for non-instantiatedLatLng
objects (by @IvanSanchez, #5135). - Fix collapsing of
L.Control.Layers
when thecollapse
option isfalse
(by @perliedman, #5131).
API changes
- Added a new
WrapLatLngBounds
method toL.CRS
, to fix an issue withmaxBounds
ofGridLayer
s (by @IvanSanchez, #5185, also thanks to @DiogoMCampos for investigation). L.Map.getSize()
will now return0
instead ofNaN
in non-graphical environments (by @ughitsaaron, #5209).
Improvements
- Several minor documentation improvements by @IvanSanchez, @jieter, @alonsogarciapablo, @jasonoverland, @danzel, @ghybs, @Ralf8686, @geoloep
- Add an
alt
attribute to the<img>
s of marker shadows (by @topicus, #5259).
v1.0.2
Leaflet 1.0.2 is a small release with a dozen bugfixes and a couple small improvements. Changes since v1.0.1:
Bug fixes
- Fix CSS for marker shadows when
max-width
is already set (by @brunob, #5046). - Fix canvas redraw when style updates fill and/or weight (by @perliedman, #5034).
- Prevent canvas from firing multiple
mouseover
events for same layer (by @perliedman, #5033). - Fixed a race condition when removing and adding
L.Canvas
vectors during a zoom animation (by @ghybs) #5011. - Fix zoom animation of ImageOverlay when CRS's Y axis is flipped (by @perliedman), #4993.
- Fix encoding/decoding of GeoJSON
FeatureCollection
s (by @IvanSanchez), #5045. - Fix
minZoom
/maxZoom
late inizialization (by @IvanSanchez), #4916. - Fix styling of custom SVG markers by making stricter CSS selectors (by @jwoyame) #4597.
- Fix order of
mouseover
/mouseout
events on overlappingL.Canvas
layers (by @perliedman), #5090. - Fix drag behaviour when a draggable marker is removed in mid-drag (by @IvanSanchez, #5063.
- Fix
L.Control.Layers.collapse()
on initially uncollapsed layer controls (by @perliedman), #5090. - Fix blurriness of
L.Tooltip
by rounding up pixel coordinates (by @ashmigelski), #5089. - Fix click events on overlapping geometries when using
L.Canvas
(by @perliedman), #5100.
API changes
- Add a
sortLayers
option toL.Control.Layers
(by @IvanSanchez, #4711. - Implement
bringToFront
andbringToBack
when usingL.Canvas
, plus preventing other canvas glitches (by @perliedman), #5115. - Add
minNativeZoom
option toL.TileLayer
s. (by @bb-juliogarcia), #5088.
Improvements
- Improve performance when adding lots of
L.Path
s by refactoring away event logic (by @IvanSanchez) #5054)]. - Several minor documentation improvements by @Jmuccigr, @serdarkacka, @erickzhao, @IvanSanchez, @perliedman, @joukewitteveen.
- Code reorganization: Extensions for
L.Marker
andL.Map
no longer have a separate file (by @mourner). - Removed a duplicated unit test (@yohanboniface).
- Accesibility improvements (ARIA/screenreader related) on map tiles (by @patrickarlt) #5092.
v1.0.1
Leaflet 1.0.1 is a small bugfix release, containing two bug fixes since the previous version:
- Fixed vector rendering regression in IE8 (by @perliedman). #4656
- Fixed Webpack error when bundling Leaflet's CSS (by @jefbarn). #4679
v1.0.0
Leaflet 1.0 final, a culmination of several years of work by dozens of contributors from all over the world. This is the fastest, most stable and polished Leaflet release ever. Read the announcement blog post.
Changes since 1.0-rc3:
API changes
- Remove deprecated
zoomanimated
option forL.Popup
s (by @fnicollet) #4699
Improvements
- Several minor fixes to the documentation (by @IvanSanchez, @alejo90, @ghybs, @JonasDralle)
- Add license to
bower.json
(by @anotherredward) #4865 - Allow creating tooltips without a source layer (by @yohanboniface) #4836
- Detect
L.Icon
default path using CSS (by @IvanSanchez) #4605
Bug fixes
- Fix handling of
getScaleZoom
in some custom CRSs (by @theashyster) #4919 - Guard
L.Path
event handlers against race conditions (by @perliedman and @IvanSanchez) #4855 #4929 #4838 - In
L.GridLayer
s, wraptileBounds
whennoWrap
is false (by @fyeah) #4908 - Fix
L.Path
'sbringToFront()
behaviour in the Edge browser (by @nikolai-b) #4848 - Remove spurious counting of event handlers (by @perliedman) #4842
- Throw error on
getCenter()
when aL.Polygon
has no map and thus no CRS (by @snkashis) #4820 - Add a
_leaflet_id
to map containers to prevent error when removing a map twice (by @IvanSanchez) #4810 - Do not fail when closing a tooltip which is not in a map (by @yohanboniface) #4937
v1.0.0-rc.3
API changes
L.Tooltip
offset
option now defaults to[0, 0]
(by @yohanboniface) #4773- Event listeners are now always called in the order they have been registered, while until rc2 listeners with a context were all called before listeners without context (even if registered later), and the listeners with context were called in an unpredictable order (by @yohanboniface) #4769
Improvements
Bug fixes
- Fixed regression where event listeners where not always fired in the order of registration (by @yohanboniface) #4769
- Fixed
L.Tooltip
zoom animation (by @yohanboniface) #4744 - Fixed
layer.bindTooltip
crashing when called before adding the layer to the map (by @yohanboniface) #4779 - Fixed regression in
L.Popup
autopaning (by @yohanboniface) #4768 - Fixed non permanent
L.Tooltip
not being closed on touch when touching the map (by @yohanboniface) #4767 - Fixed
popupopen
andpopupclose
not being fired when clicking on path with an open popup (by @yohanboniface) #4788
v1.0.0-rc.2
API changes
- Make
L.Handler.enable
/disable
returnthis
(by @yohanboniface) #4708 - Icon
size
option can now be initialised with a number (by @rheh) #4608 - Add
classname
option toL.GridLayer
(by @jayvarner) #4553 - Consistent returns for
Map.addLayer
(by @nathancahill) #4504 - Create points from objects with
x
andy
properties (by @nathancahill) #4465 - Add
updateWhenZooming
option toL.GridLayer
(by @IvanSanchez) #4462
Improvements
- Refactoring of events (by @fab1an and @perliedman) #4697
- Do not alter
popup.options.offset
when computing popup offset (fix #4645) (by @yohanboniface) #4662 - Use different
L.Bounds
for "marking as prunable" and loading tiles (by @IvanSanchez) #4650 - Added
L.Tooltip
class to display small tooltips on the map (by @yohanboniface) #3952
Bug fixes
- Fixed
GridLayer
's outer edge snapping to vertical center of map (fix #4702) (by @yohanboniface) #4704 - Fixed scrollwheel zoom too fast in MS Edge (by @IvanSanchez) #4694
- Use
pointer-events: visiblePainted
as fallback for IE <11 (by @perliedman) #4690 - Avoid double borders on
abbr
in website (by @brunob) #4663 - Prevent firing map click when layer has popup (by @jwoyame) #4603
- Disable pointer events on popup tip (by @jwoyame) #4599
- Prevent
L.DomUtil.create()
from automatically setting a CSS class name (by @MuellerMatthew) #4563 - Fix off-by-one bug in
Control.Layers._getLayer
(by @ValentinH) #4561 - Fix scrollwheel events zomming two levelz in Chrome by scaling down
getWheelDelta()
(by @IvanSanchez) #4538 - Prevent event listeners from being called when all listeners are removed (by @perliedman) #4555
- Don't prevent browser's touch scroll and/or zoom unless handlers are enabled (by @perliedman) #4552
- Fixed
getBoundsZoom
with small size and padding (by @dianjin) #4532 - Fixed
L.Control.Layers
in IE8 (by @jieter) #4509 - Fixed
TileLayer
's retina logic whenzoomReverse
is enabled. (by @perliedman) #4503 - Fixed
setMaxBounds
not resettingmaxBounds
when passingnull
argument (by @yohanboniface) #4494 - Fixed canvas not filtering click event after drag (by @yohanboniface) #4493
- Fixed
L.Control.removeLayer()
raising an error when trying to remove a layer not yet added (by @jieter) #4487 - Fixed disabling drag on click in IE11 (by @perliedman) #4479
- Fixed
L.Evented.listens()
on removed event handlers, #4474 (by @IvanSanchez) #4476 - Better handling of
markerZoomAnimation
event hooks (by @IvanSanchez) #4460
v1.0.0-rc.1
API changes
- Make
L.Control.Layers.collapse
/expand
public methods (by @yohanboniface) #4370 - Make
L.latLngBounds
factory return an empty bounds with no argument (by @yohanboniface) #4368 Map.fitBounds
now raises an error if bounds are not valid (by @theotow) #4353- Temporarily support legacy options on
L.Circle
(by @JrFolk) #4290 - Throw error on
NaN
circle radius (by @IvanSanchez) #4237 L.Class.include()
&mergeOptions()
now returnthis
(by @IvanSanchez) #4246- Consistent GeoJSON casing (by @yohanboniface) #4108
- Move
L.LatLng.equals
toL.CRS.equals
. (by @perliedman) #4074 - Make non-interactive markers not firing pointer events (by @IvanSanchez) #3937
Improvements
- Give popups an id (by @tylercubell) #4355
- Support
{-y}
in tile layer urls (by @jieter) #4337 - Support
dashArray
path option in canvas (by @gommo) #4173 - Clean up
navigator.pointerEnabled
(by @IvanSanchez) #4287 - Use array in
L.Control.Layers
internally (by @jieter) #4227 - Implement
L.Browser.edge
(by @IvanSanchez) #4143 - Optimized icons (by @vtduncan) #4124
- Cast
L.DivIcon.bgPos
option toL.Point
(by @perliedman) #4090 - Switch to wheel event where available (by @mourner) #3653
- Fractional zoom controls (by @IvanSanchez and @hyperknot) #3523
- Added click tolerance also for non-touch devices (by DavidUv) #4396
Bug fixes
- Fixed an edge case on
Map.fitBounds
(by @perliedman) #4377 - Fixed an edge case bug in
flyTo
(by @hyperknot) #4376 - Use mean earth radius for distance calculation in
L.CRS.Earth
. (by @perliedman) #4369 - Fixed zoom event fired twice (by @perliedman) #4367
- Initialize canvas dash on init. Check that canvas supports
setLineDash
. (by @perliedman) #4364 - Do not calculate inverted y coords for CRSes with infinite: true (by @jieter) #4344
- Fixed zoom handling on
Map.TouchZoom
(by @IvanSanchez) #4340 - Fixed
this._times.length
undefined inMap.Drag.js
(by @LucasMouraDeOliveira) #4324 - Fixed simulated click handling in
L.Path
(by @elkami12) #4314 - Fixed attribution text not removed when Layer is removed from map (by @dr-itz) #4293
- Fixed bug when adding/removing a layer from
L.Control.Layer
that is not on the map (by @errebenito) #4280 - Fixed
Map.attributionControl
only set onaddInitHook
(by @snkashis) #4263 - Check for
e.originalEvent
inDomUtil._filterclick
(by @IvanSanchez) #4256 - Stop drag propagation on
L.Draggable
(by @turban) #4250 - Fixed error when quickly removing a layer just added (by @hyperknot) #4244
- Fixed not resetting properly on
Map.stop
(by @IvanSanchez) #4229 - Fixed conflict between
Map.fadeAnimation
andGridLayer.opacity
(by @IvanSanchez) #4228 - Fix fractional zoom calculation (by @hyperknot) #4224
- Better cleanup of L.Control.Layers, fixes #4213 (plus unit tests) (by @IvanSanchez) #4214
- Fixed transform issue when not
L.Browser.any3d
(by @IvanSanchez) #4212 - Fixed fractional zoom controls broken when initial zoom isn't specified (by @IvanSanchez) #4209
- Fix extra tiles usage (by @IvanSanchez) #4193
- Sanity check: test
pxBounds
validity before using it (by @yohanboniface) #4191 - Disable event defaults when disabling scroll propagation (by @IvanSanchez) #4160
- Fixed precision issues in
L.Circle
radius (by @IvanSanchez) #4133 - Workarounded some touch-capable browsers firing
dblclick
instead of touch events (by @IvanSanchez) #4131 - Use all projected coords when calculating
L.Polyline
's pixel bounds. (by @perliedman) #4114 - Fixed removing all events when passing an
undefined
property (by @robertleeplummerjr) #4113 - Fixed retina URL computation (by @hyperknot) #4110
- Fire
tileunload
for all unloading of tiles (by @tcoats) #4099 - Fixed duplicated code in
L.GridLayer.retainParent()
(by @jblarsen) #4094 - Make sure to always reset
_enforcingBounds
. (by @perliedman) #4089 - Fix bug with max bounds and custom projections (by @OleLaursen) #4078
- When limiting center to bounds, ignore offsets less than a pixel. (by @perliedman) #4077
- Fixed bug for hover event between circle overlapping polygon on canvas (by @fimietta) #4072
- Fixed but where
L.Control.Layers
where callingmap._size
instead ofgetSize()
(by @Brobin) #4063 - Round new map position before animating pan (by @RLRR) #4046
- Fixed overlayed circles not responding to mouse events in canvas (by @Deftwun) #4033
- Fixed GeoJSON
resetStyle
(by @yohanboniface) #4028 - Fixed popup toggle on marker click (by @yohanboniface) #4016
- Fixed event target fallbacking to map after marker drag (fix #3971) (by @yohanboniface) #4010
- Fixed
maxZoom
not honoring 0 (by @simsibimsiwimsi) #4000 - Skip
L.GridLayer._updateLevels()
when out of min/max zoom (prevents IE8 exceptions) (by @IvanSanchez) #3999
-...
v0.7.7
- Fixed a regression that could sometimes cause tiles to disappear when pinch-zooming on iOS devices.
- Fixed a regression related to msPointer detection in IE10 (affecting Leaflet.draw and some other plugins) (by @danzel) #3842 #3839 #3804
- Fixed a bug where a mouseout could fire after a vector element was removed (by @sambernet). #3849 #3829
- Fixed touch interactions in Edge browser (by @mitchless & @neorth). #3853 #3379
- Fixed a bug where removing a layer group from a feature group would throw an error (by @Lambdac0re). #3869
Note that we skipped 0.7.6 version for which we accidentally published a broken build to NPM.
v1.0.0-beta.2
Beta 2 fixes over 50 bugs that were reported by users trying out beta 1. The vast majority of changes are small fixes to problems that are triggered in very specific situations or conditions, a few API consolidation changes, and a few browser workarounds.
API changes
L.circle
now acceptsradius
as an option (likeL.circleMarker
) rather than a second argument (by @IvanSanchez)
Improvements
- Implemented canvas optimizations on mousehover interactions (by @philippelatulippe) #3076
- Improved drag behaviour by preventing a
preclick
event during drag (by @yohanboniface) #3632 - Implemented
L.ImageOverlay.setBounds()
and fixed image overlay initialization (by @fminuti) #3680 - Implemented draggable items to fire
mousedown
events (by @yohanboniface) #3682 - Changed detection of browsers capable of
msPointer
events (by @IvanSanchez) #3684 - Implemented latitude truncation for spherical mercator projection (by @perliedman) #3700
- Armored against browsers not implementing
Geolocation.clearWatch()
#3707 - Implemented generation of sourcemaps when building and minifying source files (by @IvanSanchez) #3723
- Added
bringToFront
andbringToBack
to popups (by @danzel). #3908 #3307 - Multiply offset by 3 on keyboard pan when shift key is pressed (by @yohanboniface) #3921
Bug fixes
- Fixed event propagation on double finger tap (by @IvanSanchez) #3532
- Fixed style changes on re-added layers (by @wpf500) #3547
- Fixed
preventOutline
exceptions #3625 - Fixed a box zoom regression bug #3633
- Fixed
contextmenu
behaviour when there are no event listeners (by @yohanboniface) #3638 - Fixed map controls not showing on top of map layers (by @patrickarlt) #3644
- Fixed display of marker images with
max-width
(by @davidjb) #3647 - Fixed
mouseout
andmouseover
event bubbling (by @yohanboniface) #3648 #3797 #3708 - Fixed a layer control bug when removing layers (by @davidlukerice) #3651
- Fixed pan and zoom animations interacting with each other #3355 #3655
- Fixed a regression bug in canvas renderer when removing layers #3661
- Remove a workaround for legacy Android 2 browsers #2282
- Fixed VML vector rendering in IE8 when removing and re-adding layers (by @fminuti) #2809
- Fixed
flyTo
animations when the map center doesn't change (by @fminuti) #3663 - Fixed fade animations for semitransparent tile layers (by @w8r) #3671
- Fixed behaviour of the
baselayerchange
event (by @yohanboniface) #3677 - Fixed marker icon handling during a marker drag (by @IvanSanchez) #3687
- Fixed a IE 11 map container visibility bug (by @fminuti) #2788
- Prevented dragging interactions while a map zoom animation is running (by @IvanSanchez) #3692
- Implement disabling layers in the layer control when they are unavailable at the current zoom level (by @IvanSanchez) #252
- Refactored
L.Util.requestAnimFrame
definition (by @fminuti) #3703 - Fixed an edge case of
L.Circle.getBounds()
(by @knabar) #3776 - Fixed
Rectangle.setBounds()
return value (by @IvanSanchez) e698f64 - Fixed event firing order when opening a popup (by @yohanboniface) #3745
- Fixed tile layer loading when dragging then immediately pinch-zooming the map (by @IvanSanchez) #3814
- Work around browser limitations when panning the map too far away (by @yohanboniface and @IvanSanchez) #3608
- Fixed popup text selection and touch events for IE 10 (by @danzel) #3804
- Fixed tile layer ordering when
maxZoom
is set (by @patrickarlt) #3721 - Fixed scale behaviour on non-standard CRSs (by @javimolla, special thanks to Your First PR) #2990
- Fixed rendering of off-screen vector layers (by @yohanboniface) #3836
- Fixed rendering of intersecting vector layers (by @yohanboniface) #3583
- Enforced stricter code linting
- Fixed disabled drag handlers not being able to be re-enabled (by @yohanboniface) #3825
- Fixed panning outside the map bounds (by @yohanboniface) #3878
- Worked around IE 11 not focusing the map using keyboard (by @IvanSanchez) #3772
- Fixed vector layer positioning during a zoom animation in low zoom (by @IvanSanchez) #3769
- Implemented
noWrap
option inL.GridLayer
(by @IvanSanchez) #3691 - Fixed popups panning the map while running another pan animation (by @yohanboniface) #3744
- Fixed uncorrect length of scale control due to CSS styles (by @yohanboniface) #3668
- Fixed detection of default image path for icons (by @ilfa) #3770
- Various Canvas events fixes (by @yohanboniface) #3917
- Fix touch scroll in layers control (by @yohanboniface) #2882
- Fix duration not passed through from setView to panBy (by @yohanboniface) #3300