Changelog History
Page 3
-
v1.0-rc2 Changes
July 18, 2016API 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
- π Make
-
v1.0-rc1 Changes
April 18, 2016API 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 - 0οΈβ£ 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 L.DomUtil.getPosition()
should return a fallback value (for VML in IE8) (by @IvanSanchez) #3998L.Marker
: init interaction regardless of new icon or not (by @celadevra) #3978- π Fix
interactive=false
not taken into account for canvas (by @yohanboniface) #3956 - π Fix canvas path disappearing on animation (by @klaftertief) #3950
- Only check for moving draggable in canvas renderer when map is draggable (by @klaftertief) #3942
- π Fix SVG Dragging issues in IE and Edge (by @perliedman) #4382
- π Fix click not working on inputs in controls in IE 11 (by @perliedman) #4371
- π Make drag and touch zoom handlers insensitive to order of event handlers (by @perliedman) #4387
Other
- β Added a Code of Conduct (by @mourner) #4142
- π Dual 1.0 & 0.7 docs to gh-pages (by @IvanSanchez) #4085
- πdoc (by @IvanSanchez) #3916
- π A lot of documentation improvements (by @nathancahill) #4418, #4419, #4423, #4425 and a lot more
- Replace links to google groups with ones to GIS StackExchange (by @IvanSanchez) #3886
- π Make
-
v1.0-beta2 Changes
October 14, 2015βͺ 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) https://github.com/Leaflet/Leaflet/commit/e698f641afadd4a0b412a6c9e065a6dbfbe16f44 - π 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
-
v1.0-beta1 Changes
July 14, 2015π The first beta of the huge, long-awaited Leaflet 1.0 release.
β¬οΈ This version contains a lot of beneficial but potentially breaking changes (especially if you're a plugin author), so please read through the changes carefully if your code breaks after upgrading.
Vectors API improvements
π Leaflet vector layers rendering got a major rewrite, making it possible to switch between rendering backends (Canvas, SVG) dynamically (and even use both for different layers at the same time), have more than one physical pane for vector layers, significantly improving performance, adding Canvas retina support, getting rid of ugly hacks and generally making the code much cleaner. Main PR #2290.
- β Added
Renderer
layer (inherited by SVG/Canvas implementations) that handles renderer bounds and zoom animation. - β Added
SVG
&Canvas
classes that now contain all renderer-specific code for vector layers and can be added as layers to the map. - All vector layer classes (
Path
,Polyline
, etc.) now don't contain any renderer-specific code and instead can be passed a renderer layer to use asrenderer
in options; - β Removed
MultiPolyline
andMultiPolygon
classes since multiple rings are now handled byPolyline
andPolygon
classes respectively. Layers with multiple rings now perform much better (since each is now physically a single path object instead of being aFeatureGroup
of layers). - π Dramatically improved performance of interactive Canvas layers. Mouse events work much faster (due to improved hit detection algorithms), and layers get updated many times faster (with partial redraws instead of redrawing the whole Canvas).
- π Dramatically improved performance of interactive SVG layers (e.g. creating a big GeoJSON layer and adding to a map got 3x faster while taking 2.5x less memory). #2240 #2315
- β Added retina support for Canvas layers.
- π Improved default vector layer styles.
- β Added
Polyline
andPolygon
getCenter
for getting centroids. - Respectively, improved
Polyline
andPolygon
popup positioning when callingopenPopup
. - π Improved
Polyline
/Polygon
getBounds
to be cached (so it works much faster). - π Changed
Circle
to inherit fromCircleMarker
and not the other way. - π Fixed
GeoJSON
resetStyle
to work properly in casestyle
option wasn't set. - π Fixed a bug where map fired
moveend
when updating Canvas layers. - β Removed
Polyline
andPolygon
spliceLatLngs
method (just usesetLatLngs
instead). - π Changed
Polygon
getLatLngs
to always return an array of rings (nested array) (by @yohanboniface). #2618 #3386 Leaflet/Leaflet#3279 #2648 - β Added the ability to specify a custom pane for vector layers (making it possible to easily do stacks like vectors-tiles-vectors with proper z-index order) (by @Jakobud). #3266 #2786
- β Added vector layers
fillRule
option (by @bullgare). #2834 - Removed
L_PREFER_CANVAS
global switch and addedMap
preferCanvas
option instead (by @yohanboniface). #3623
Layers API improvements
π¨ All Leaflet layers (including markers, popups, tile and vector layers) have been refactored to have a common parent,
Layer
class, that shares the basic logic of adding and removing. The leads to the following changes (main PR #2266):- β Added
Layer
class which all layers added to a map should inherit from. - β Added
add
andremove
events to all layers. - β Added
remove
method to layers and controls (marker.remove()
is now equivalent tomap.removeLayer(marker)
). - π Improved performance of adding and removing layers.
- β Added
pane
option to all layers that can be changed (e.g. you can setpane: 'overlayPane'
to a tile layer). - β Added
map
createPane
method for custom panes. #1742 - π Simplified map panes — removed
objectsPane
, all panes are on the same level now. - β Added
shadowPane
option to markers as well. - β Added
getEvents
method to all layers that returns an{event: listener, ...}
hash; layers now manage its listeners automatically without having to do this inonAdd
/onRemove
. - β Added
togglePopup
,setPopupContent
,getPopup
,isPopupOpen
methods to all layers. #2279 #2292 - π Improved performance of adding/removing layers with layers control present (instead of listening to any layer add/remove, the control only listens to layers added in configuration).
- π Fixed
FeatureGroup
getBounds
to work correctly when containing circle markers. - β Removed
Map
tilelayersload
event. - β Removed
Popup
open
andclose
events in favor ofadd
andremove
for consistency. - π Moved all layer-related logic in
Map.js
toLayer.js
. - π Improved
FeatureGroup
bindPopup
to accept a function for generating popup content, significantly improving memory footprint when adding popups to a huge number of layers (by @patrickarlt). #3109 #3059 - β Added
ImageOverlay
interactivity (mouse events, etc.) (by @snkashis). #3009 #1727 - β Added
ImageOverlay
getBounds
(by @brunob). #2848 - π Renamed
clickable
option tointeractive
(by @AndriiHeonia). #2838 #2499 - π Changed the default z-index of panes to be bigger, leaving more room for customization (by @patrickarlt). #3591
- π Improved DOM event bubbling mechanism for layers (by @yohanboniface). Leaflet/Leaflet#3307 #3450 #3307
- β Added
nonBubblingEvents
option to layers (by @yohanboniface). #3605 #3307 #3604
In addition, layer events implementation was rewritten to use event delegation, significantly improving add/remove performance and memory footprint. #3032 #46
TileLayer & Projections API improvements
π¨ TileLayer code and everything projections-related has undergone a major refactoring, documented in PR #2247. It includes the following changes (in addition to much cleaner and simpler code):
TileLayer API improvements
These changes make implementing custom grid-like layers for Leaflet much easier.
- π Moved most of the
TileLayer
logic into the newGridLayer
class (whichTileLayer
now inherits, extending it with logic specific to tile servers). - β Removed
TileLayer.Canvas
in favor of the much more flexible and powerfulGridLayer
. - π Improved tile wrapping and bounding logic in
TileLayer
to work transparently and completely depent on the CRS used; removed the need forTileLayer
hacks when using custom projections. - β Added non-square tiles support (by @IvanSanchez). #3573 #3570
- β Removed
url
property intileload
andtileloadstart
events (get it throughtile.src
).
Projections API improvements
π These changes were targeted at removing any hardcoded projection-specific logic accross Leaflet classes, making it transparent and driven by the chosen CRS. They make using Leaflet with custom projections (including flat maps) much easier, and remove the need for ugly hacks in the Proj4Leaflet plugin.
- β Added
CRS.Earth
which serves as a base for all Earth-based CRS (EPSG3857
etc.). #2345 - β Added
Projection
bounds
property that defines bounds for different projections (Mercator
, etc.) in projected coordinates (by @perliedman). - β Added
CRS
wrapLat
andwrapLng
properties which define whether the world wraps on a given axis and in what range. Set as[-180, 180]
forEPSG:3857
,EPSG:4326
,EPSG:3395
by default. - β Added
CRS
andMap
wrapLatLng
(the latter depends on the chosen CRS). - β Added
CRS
infinite
property that disables boundaries (the world can go on infinitely in any direction), default forCRS.Simple
. - β Added
CRS
getProjectedBounds
andMap
getPixelWorldBounds
methods that returns world bounds in projected coordinates depending on zoom (derived fromProjection
bounds
) (by @perliedman). - β Added
CRS
unproject
method that converts coordinates in CRS-dependent units intoLatLng
coordinates (by @sowelie). - β Added
Map
distance(latlng1, latlng2)
method that takes CRS into account and works with flat projections. #2345 #1442 - π Improved
Circle
to be approximated with an ellipse in Earth-based projections. #2345 - π Fixed
EPSG:4326
to have correct tile pyramid (2x1 tiles at root). - π Fixed
Projection.SphericalMercator
to project to meter units (by @calvinmetcalf). - π Fixed
Map
worldCopyJump
option to work for other projections. - π Fixed
Circle
to work with flat projections. #2345 #1465 - π Fixed scale control precision in non-EPSG:3857 projections. #2345
- π Fixed
ImageOverlay
not working properly in some non-standard projections. #3011
Animations improvements and fractional zoom
Animation code in Leaflet had undergone a major rewrite (main PR: #2382), bringing improvements such as:
- Multi-level tile buffering for more seamless zooming experience with less flickering
- Optimal path animation (
map.flyTo
) for zooming to a particular place in a curve (simultaneously zooming and panning) - π Fractional zoom support — now you can do things like
map.setZoom(12.45)
and it just works. - Layers now rely on
zoom
event in addition toviewreset
for frame-by-frame zoom animations. #3278
UX improvements
- π Improved panning inertia behavior so that there are no tearing during animation when panning around quickly. #2360
- π Improved inertial scrolling to have a nicer, more natural feel (by @RickMohr). Leaflet/Leaflet#3063 #3063 #3062 #2987
- β Added popup fade out animation.
- π Improved keyboard support to ignore keystrokes with modifier keys (Ctrl, Alt, Meta) to not interfere with OS shortcuts.
- Made popup to close when pressing Escape (by @snkashis). #951 #3000
- π Improved keyboard zoom to zoom by 3 levels if shift key is pressed (by @yohanboniface). #3024
- π Improved layers control to become scrollable when there are too many layers (by @rowanwins). #3571 #3167
π Misc. performance improvements
- π Significantly improved
LatLng
creation performance (8x). - π Improved performance of layer objects construction.
- π Significantly improved
FeatureGroup
(and correspondinglyGeoJSON
) layer adding and events performance (about 10x) by implementing a much better event propagation mechanism. #2311 - π Improved Leaflet events and DOM events memory footprint.
- π Improved
Evented
off
performance by about 2 times.
Other breaking API changes
- π Changed
DomUtil
off
to requirecontext
attribute if you remove a listener that was previously added with a particular context. - β Removed
DomUtil.getViewportOffset
method as it is no longer necessary. - β Removed
DomUtil
getTranslateString
andgetScaleString
methods. - β Removed
DomUtil
documentIsLtr
method. - Removed
LatLng
RAD_TO_DEG
,DEG_TO_RAD
andMAX_MARGIN
constants. - π Renamed
Util.limitExecByInterval
toUtil.throttle
.
Other API improvements
- β Added
Evented
class that now many Leaflet classes inherit from (instead of mixing in events methods in each class), while keeping the oldincludes: L.Mixin.Events
syntax available. #2310 - π Improved
Class
options
to be prototypically inherited instead of copied over in children classes, which leads to more efficient memory use, faster object construction times and ability to change parent options that get propagated to all children automatically (by @jfirebaugh). #2300 #2294 - β Added
{r}
variable toTileLayer
url
for adding"@2x"
prefix on Retina-enabled devices (by @urbaniak). #2296 - β Added
Point
ceil
method (by @perliedman). - β Added
Util.wrapNum
method for wrapping a number to lie in a certain range. - π Improved
L.bind
to use nativeFunction
bind
on modern browsers and prepend real arguments to bound ones. - β Added
LatLng
equals
second argumentmaxMargin
. - β Added
DomUtil
setClass
andgetClass
methods. - π Improved
Marker
move
event to includeoldLatlng
(by @danzel). #2412 - β Added
Marker
mousemove
event (by @bullgare). #2798 - π Improved
DomEvent
on
/off
to accept space-separated events and object literals ({type: fn}
). - β Added
DomUtil
toFront
andtoBack
methods. - β Added
Evented
listens
as a shortcut tohasEventListeners
. - β Added optional support for center-oriented scroll for
L.map
optiontouchZoom
(by @mtmail). #2527 - β Added
getElement
method to all layers that returns an associated DOM element. - β Added
LatLng
clone
method (by @yohanboniface). #3390 - β Added
Map
setMinZoom
andsetMaxZoom
methods (by @nathancahill). #3383 #3380 - β Added
originalEvent
toMap
andMarker
drag
andmove
event data (by @yohanboniface). #3264 - β Added
Popup
autoClose
option (by @jfirebaugh). #3018 #2716 #1853 - β Added
Control.Zoom
enable
anddisable
methods. #3172 - β Added an argument to
L.PolyUtil.clipPolygon
that controls rounding (by @aparshin). #2926 #2917 - β Added
Map
wheelDebounceTime
option (by @AndriiHeonia). #2836 #2501 - β Added
TileLayer.WMS
uppercase
option (nowfalse
by default) (by @kdeloach). #2831 #1751 - β Added
ImageOverlay
alt
option (by @francis-liberty). #2767 #2564 - π Improved
L.Util.extend
performance (by @fab1an). #2746 - β Added
Map
stop
method for stopping panning orflyTo
animation. - β Added
Map
maxBoundsViscosity
option that controls how much the map resits dragging out of max bounds (set to1
for a hard limit) (by @IvanSanchez). #2224 #3510 #1673 - β Added
Bounds
andLatLngBounds
overlaps
method (by @IvanSanchez). #2981 #3508 - β Added
ImageOverlay
crossOrigin
option (by @patrickarlt). #3594 #2621
π Bugfixes
- π Fixed
DomUtil
on
to make it possible to add the same listener to the same element for multiple contexts. - π Fixed a bug that thowed an error when attempting to reinitialize the map on unload (by @gamb). #2410
- π Fixed excessively blurry non-retina tiles on retina iOS devices.
- π Fixed a bug with popup close button in IE7/8. #2351
- π Fixed
ImageOverlay
mercator distortion on lower zoom levels. - π Fixed a bug where layers didn't fire
popupopen
andpopupclose
events when manually creating a popup object and passing it tobindPopup
. #2354 - π Fixed box-zoom overlay appearing under markers. #1813
- π Fixed
Map
panInsideBounds
to accept array-form bounds (by @RLRR). #3489 - π Fixed marker draggable state to persist when removing and adding back to the map (by @IvanSanchez). #3488
- π Fixed inertia not working when parallel to axis (by @rikvanmechelen). #3432
- π Fixed images and SVG inside popups having max-width property overridden (by @yohanboniface). #3452
- π Fixed cursors when dragging is disabled (by @juliensoret). #3219 #3233
- π Fixed
LatLng
wrap
to not drop altitude (by @IvanSanchez). #3420 - π Fixed Firefox for Android not being detected as mobile (by @IvanSanchez). #3419
- π Fixed an infinite loop when calling
setMaxBounds
several times in a row (by @IvanSanchez). #3410 #3320 - π Fixed a WTF
Map
locate
bug that could cause some unexpected effects (by @sindre). Leaflet/Leaflet#3404 - π Fixed broken zoom in Project Spartan browsers (by @mitchless). #3379
- π Fixed broken
Polygon
getCenter
when all points in the same pixel (by @yohanboniface). #3372 - π Fixed broken
Polyline
getCenter
when the line is very small (by @yohanboniface). #3371 - π Fixed keyboard zoom out not working on
azerty
keyboards. #3362 - π Fixed a bug where tabbing to an offscreen marker broke control positioning (by @IvanSanchez). #3340 #3333
- π Fixed
Map
panBy
not always returningthis
(by @Trufi). #3303 - π Fixed a bug where pushing a zoom control with a keyboard would switch focus to the map (by @Jakobud). #3275 #3159
- π Fixed more race conditions leading to map freeze. #3270 #3268 #2693 #2478
- π Fixed iOS race condition when doing a very small pan. #2519
- π Fixed
Polygon
toGeoJSON
exporting aMultiPolygon
in some cases (by @yohanboniface). #2977 - π Fixed
TileLayer.WMS
passing all options as WMS params. #2972 - π Fixed a race condition that made
map.fitBounds(map.getBounds())
zoom out sometimes. #2957 - π Fixed a bug where a draggable marker stopped being draggable after
setIcon
(by @jeffsmale90). #2578 - π Fixed some IE11 touch performance and stability issues (by @danzel). #3007 #2820
- π Fixed a race condition with
TileLayer
whenmaxNativeZoom = 0
. #3004 - π Fixed
FeatureGroup
setStyle
not affectingImageOverlay
opacity
(by @opie). #3008 #2246 - π Fixed class init hooks not being called for parent classes (by @jfirebaugh). #2545
- π Fixed a bug when adding a control that's already added or removing a control that's not present (by @jfirebaugh). #3020 #2877
- π Fixed buggy inertia on low zoom levels when
Map
worldCopyJump
option is enabled (by @flemenach). #3038 #2624 - π Fixed a bug where
getMaxZoom
sometimes returned wrong result inside aControl.Layers
baselayerchange
event (by @CloudNiner). #3048 #2318 - π Fixed a bug where during zooming one map, dragging was disabled on all other maps on the page (by @kdeloach). #3050 #2539
- π Fixed a
Map
getSize
race condition where it could return a wrong result (by @kshepard). #3052 #3031 - π Fixed
L.latLng
factory to acceptaltitude
as a third argument too (by @lonelyelk). #3070. - π Fixed
L.latLng
factory to not throw error on empty array input (by @lonelyelk). #3080 #3079 - π Fixed popups to have a default color (by @snkashis). #3115 #3112 #333
- π Fixed
Map
locate
not to mutate the given options object (by @tmcw). #3173 - π Fixed Canvas polylines not to render if stroke is set to 0 (by @optical). #3203
- Prevented a Joomla bug that could lead to vector layers disappearing (by @SniperSister). #2886 #2881 Leaflet/Leaflet#2881
- π Fixed IE Metro touch events passing through objects on top of a Leaflet map (by @nikgavalas). #2954
- π Fixed a bug where vector layers wouldn't display on websites with SVG max-width set to 100% (by @SniperSister). #2886 #2881
- π Fixed
Marker
setIcon
to not reset popup anchor offset (by @bullgare). #2872 - π Fixed a case where you provide
zoom
inMap
options and then set center (by @AndriiHeonia). #2849 #1871 - π Fixed a race condition with
TileLayer
setUrl
whereloading
event didn't fire properly (by @bennlich). #2802 #2675 #2827 - π Fixed a bug where a tile layer was not cleaned up properly after zooming past its max zoom (by @francis-liberty). #2764 #1905
- π Fixed a memory leak with
Marker
setIcon
(by @jfgodoy). #2811 - π Fixed
LatLng
distanceTo
to not returnNaN
on equal locations. #2705 - π Fixed a bug where
TileLayer
maxNativeZoom
didn't work properly withbounds
option set (by @mlegenhausen). #2725 #2704 - π Fixed a bug where tiles touching the edge of the bounds from outside where loaded (by @IvanSanchez). #2981 #3508
- π Fixed a memory leak in
map.remove()
(by @IvanSanchez). #3514 #2718 - π Fixed a bug where layers control collapsed when hovering over a disabled radio button (by @rowanwins). #3564 #2771 Leaflet#2771
- π Fixed GeoJSON not accepting null geometry (by @pglotov). #3585
- π Fixed occasional popup 1px horizontal offset (by @patrickarlt). #3587 #3526 #3586 #3525
- π Fixed some inconsistencies in mouse events for Canvas vector layers (by @wpf500). #3590 #3568 #3618
- π Fixed scale control for non-earth CRS (by @cmulders). #3614
Misc improvements
- π Improved the build system (
jake build
) to report gzipped library size. - β Added version name and commit number to Leaflet builds. #2276
- β Added Leaflet logo in vector format as
src/images/logo.svg
. - β Added reference to Leaflet CSS in
package.json
(by @bclinkinbeard). #2432 - π Switched from JSHint to ESLint for checking code style and made the checks more strict. #3176
- β Added a plugin guide section on module loaders and publishing plugins (by @patrickarlt). #2955 Leaflet/Leaflet#2955
- π Fixed the build system to work in non-git Leaflet folder (by @cschwarz). #2758
- β Added
-
v0.7.7 Changes
October 26, 2015- π 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 tha we skipped 0.7.6 version for which we accidentally published a broken build to NPM.
-
v0.7.5 Changes
September 02, 2015- π Fixed a regression that broke animation in Leaflet.markercluster. #3796
-
v0.7.4 Changes
September 01, 2015- π Fixed a bug introduced by a recent Chrome update that caused the map not to react to interactions until all tiles are loaded. #3689
- π Fixed a bug where tile layers were not respecting their
minZoom
ormaxZoom
options (by @ivansanchez) #3778 - π Improved detection of touch-capable web browsers, in particular fixing touch interactions in device emulation mode in Chrome and Firefox (by @ivansanchez) #3520 #3710
- π Fixed a bug where tile layers with
maxNativeZoom
were not checking bounds properly (by @jlaxon) #3415 - π Fixed a bug where popups were not remembering which layer originated them after calling
bindPopup(popup)
(by @Eschon) #3675 - π Fixed a race condition between markers and zoom animation (by @perliedman) #3152
- π Fixed a bug with
Map.fitBounds
padding (by @bsstoner). #2489 - π Allow canvas paths to fire
dblclick
andcontextmenu
events (by @ivansanchez) #3482 - π Allow canvas filled polygons to use the
fillRule
option (by @w8r) #3477 - π Allow canvas lines to use
lineCap
andlineJoin
options (by @northerneyes) #3156 - β‘οΈ Updated bower definitions to comply with best practices (by @guptaso2) #2726 #3448
-
v0.7.3 Changes
May 23, 2014- Added proper bower and component support (by @calvinmetcalf). #2561 #1903
- π Fixed a bug where dragging the map outside the window caused an error on FF. #2610
- π Fixed a bug where some taps on Android where not working, often falsely perceived as drags (by @axefrog). #2503
- π Fixed a bug where clicks on Android were skipped when happened too fast. #2303
- π Fixed a bug where calling
setView
(or similar methods) several times in succession could freeze the map. #2521 #2236 #2485 - π Fixed a bug where
Control.Layers
wasn't properly removed (by @jack-kerouac). #2569 - π Fixed a bug that caused
TileLayer
load
event not to fire properly. #2510 - π Fixed Canvas-based paths not triggering
remove
event when removed (by @adimitrov). #2486 - π Fixed a bug where you could end up with fractional zoom after pinch-zooming in some cases (by @danzel. #2400 #1943
-
v0.7.2 Changes
January 17, 2014- β‘οΈ Fixed a bug that appeared with Chrome 32 update that made all mouse events shifted on scrolled pages. #2352
- π Fixed a bug that could break tile loading when using non-standard tile sizes. #2288
- π Fixed a bug where
maxNativeZoom
option didn't work with TMS tile layers (by @perliedman). #2321 #2314
-
v0.7.1 Changes
December 06, 2013- π Fixed a bug where pinch-zooming quickly could occasionally leave the map at a fractional zoom thus breaking tile loading (by @danzel). #2269 #2255 #1934
- π Fixed tile flickering issues on some old Android 2/3 devices by disabling buggy hardware accelerated CSS there (by @danzel). #2216 #2198
- π Fixed a regression that sometimes led to an error when you started pinch-zoom as the first action on the map (by @danzel). #2259 #2256
- π Reverted
L.Util.template
optimizations to allow Leaflet to be used in eval-banning environments like browser extensions (performance gain was insignificant anyway) (by @calvinmetcalf). #2217 #2209 #1968 - π Fixed a regression where
Map
invalidateSize
could lead to unexpected results when called before map initialization (by @Zverik). #2250 #2249 - π Fixed a regression where
FeatureGroup
containing other group overwrote originale.layer
value in mouse events (by @gumballhead). #2253 #2252 - π Fixed a regression where
CircleMarker
setLatLngs
didn't returnthis
(by @radicalbiscuit). #2206