Leaflet Changelog
Leaflet Changelog
(all changes without author notice are by @mourner)
1.7.0 (2020-09-03)
Bug fixes
- Fix build toolchain to reflect uglifyjs upgrade from v2 to v3 (by @ivansanchez)
1.7.0 (2020-09-03)
API changes
- VideoOverlaynow can take a- mutedoption (#7071 by @ronikar)
- The featureGroupfactory method now takesoptions, as theFeatureGroupconstructor (#7160 by @frogcat)
Improvements
- Use passive event listeners for touchstart/touchendevents (#7008 by @yneet)
- Better detection of PointerEvents-capable browsers inL.Browser, and related changes toTap,Drag, andTouchZoomhandlers (#7010, (#7033, (#7036, (#7068, (#7195 by @johnd0e)
- Add more browser profiles for the automated tests (#7115 by @johnd0e)
Bug fixes
- Fix canvas renderer not clearing the canvas on some zoom transformations, was affecting opacity of items (#6915 by @chipta)
- Fix detection of passive events in L.Browser(#6930 by @Ivan-Perez)
- Prefix MS-specific CSS style to prevent warnings (by @ivansanchez, kudos to @zachricha for #6960)
- Clean up moveendlistener frommap.setMaxBounds(#6958 by @simon04)
- Fix wrong scope of bindcall in ESM environments (#6970 by @shintonik)
- Check that closePopupexists before calling it automatically (#6962 by @pke)
- Fix exception when calling layerGroup.hasLayer()with wronglayerId(#6998 by @johnd0e)
- Remove clickfilter targeting Android 4.x browsers (#7013 by @johnd0e)
- Fix touch zoom handler context (#7036 by @johnd0e)
- Tests for Bounds.overlaps()andBounds.intersects()(#7075 by @mondeja)
- Fix event propagation in a popup’s container (#7091 by @johnd0e)
- Fix tile flickering when maxNativeZoom === maxZoom(#7094 by @johnd0e)
- Fix GridLayer’s zoom-level loading algorithm (#7123 by @johnd0e)
- Fix tooltipAnchorbehavior for different tooltip directions (#7155 by @Istador)
Docs & Web Site
- Updated examples to use non-legacy Mapbox tiles, and related changes (#6905 by @riastrad) (#6922 by @danswick) (#6995 by @riastrad)
- Fix documentation for Polyline.addLatLng()(#6924 by @life777)
- CRS tutorial: change link for UQM tool to an archived version (by @ivansanchez)
- Fixed minor spelling errors in documentation (#6850 by @flopp) (#6944 by @jieter)
- Fixed typo in panes documentation (by #6939 by @R4M80MrX)
- Fixed broken URL in quick-start example (#6982 by @ekbarber)
- Fix documentation for map.setMaxBounds()(#7001 by @johnd0e)
- Fix tilt code in handler tutorial (#7014 by @vncntcltt)
- Fix instructions for using jekyllwhen building docs (#7014 by @vncntcltt)
- Update WMS servers in WMS tutorial (#7014 by @vncntcltt)
- Website constrast changes and minor cleanup (by @mourner)
- Fixed typo in WMS example (#7098 by @andreasnuesslein)
- Fix documentation for divOverlay.getElement()(#7111 by @mondeja)
- Fix documentation for Marker.shadowPane(#7135 by @mi-v)
- Update URL about NPM in developer docs (#7161 by @iamtekson)
- Fix documentation for Layer.removeFrom()regardingLayerGroups (by @ivansanchez)
- Fix documentation for LatLngBounds.overlaps()#7194 by @DerZade)
1.6.0 (2019-11-17)
API changes
- GeoJSON.resetStyle- allow invocation without an argument (#6663 by joukewitteveen)
- Add new markersInheritOptionsoption toL.GeoJSON(#6866 by ghybs)
Improvements
- Use passive event listeners (#6694 by danielkorte)
- Add oldLatLngcoordinates toL.CircleMarkermoveevent (#6719 by errnesto)
- Add tests (#6839, #6841 by ghybs)
- Add test case to ensure scientific notation is formatted correctly (#6877 by desean1625)
Bug fixes
- Fix performance issue with L.Util.formatNum(#6668 by cherniavskii)
- Respect classNameoption inSVGOverlayandVideoOverlay(#6679 by IvanSanchez)
- Cancel the canvas mousehoverthrottle onmouseout(#6749 by IvanSanchez)
- Check for style being passed in L.Path.setStyle(#6728 by TheRealTorreySmith)
- Fix dblclickevent when both Pointer Events and Touch Events are available (#6855 by filcab)
- Properly unbind animation proxy events when removing map (#6867 by ghybs)
- Fix race condition in Markerwhen icon is not present (#6794 by BenTalagan)
Docs & Web Site
- Update SvgOverlay code example (#6658 by cherniavskii)
- Fix mobile locate accuracy snippet (#6693 by ghybs)
- Fix broken accordions (#6770 by mbachner)
- Fix misleading L.Markerdocs sections (#6871 by chloe-mc)
1.5.1 (2019-05-08)
- Fix module export regression (#6647 by cherniavskii)
1.5.0 (2019-05-08)
API changes
- Add keepAspectRatiooption toVideoOverlay(#6038 by ronikar)
- Add support for keydownandkeyupevents to map (#6421 by OrBin)
- Add shadowPaneoption toMarker(#6460 by alexfig)
- Add L.SVGOverlayclass (#6517 by Zsavajji)
- Add getIconmethod toMarker(#6457 by OsamaShabrez)
Improvements
- Update attribution link to HTTPS (#6593 by WillSelway)
- Make DivIconhtmloption accept Element (#6571 by oscar-sensornet)
- Microoptimize GeoJSON._setLayerStyle(#6616 by johnd0e)
- Reuse openPopupandopenTooltipcode (#6613 by johnd0e)
Bug fixes
- Fix Control.Layersradio buttons when using multiple maps (#6483 by jjimenezshaw)
- Explicitly remove controls from the map on map unload (#6488 by IvanSanchez)
- Fixed a bug where mouseover on Canvas-rendered polylines acted inconsistently (#6516 by IvanSanchez)
- Prevent tiles highlighting in IE11 (#6570 by VictorVelarde)
- Fix L.Util.formatNumrounding precision (#6587 by inkstak)
- Fix crash, when setting opacity on Markerwithout icon (#6610 by charlie67)
- Make synthetic dblclickevent relate to left mouse button (#6628 by IvanSanchez)
Docs & Web Site
- Minor spelling corrections in Docs/Tutorials (#6464 by ilyankou)
- Document toGeoJSON’sprecisionargument (#6375 by rkatka)
- Add background color CSS declaration (#6614 by milesflo)
- Clarify Events.offmethod docs (#6619 by lancebendo)
- Fix Layerexample (#6636 by billygarrison)
Development workflow
1.4.0 (2018-12-30)
API changes
- Add new Map.panInsidemethod (#6054 by daverayment)
Improvements
- Remove unused _drawnLayersobject (#6324 by ud09)
- Avoid unnecessary redrawing in TileLayer.setUrl()when URL does not change (#6313 by JackNeus)
- Use sectioninstead offormin layers control (#6380 by hundekoerper)
- Add IE11 linked SVG elements support to DomUtil.getClassfunction (#6366 by Schleuse)
Bug fixes
- Set internal flags at beginning of map initialization (#6362 by ghybs)
- Guard against layers no longer attached to a map in bringToFront/Back()(#6389 by perliedman)
- Fix autoPanoption when popup content gets updated while a panning animation is running (#6365 by Schleuse)
- Ignore dash arrays with non-numeric entries in canvas (#6387 by perliedman)
Docs & Web Site
- Remove additional <tr>(#6334 by mgred)
- Fix command to run test with karma options (#6363 by ghybs)
- Add OSM logo to “Trusted by the best” section (#6360 by astv99)
- Fix typos (#6398 by HarryMaher)
- Make it clear zoomanim is not always fired on every frame (#6388 by perliedman)
- Add copyright references to code examples (#6439 by jbelien)
- Fix insecure content error (#6442 by tambry)
- Remove incorrect Earth GIF (#6326 by Vincentdecursay)
- Fix duplicated sentence in SVG section (#6448 by patrickdemers6)
1.3.4 (2018-08-21)
Improvements
- Reset max-width and max-height styles for tiles in custom panes (#6255 by jerekshoe)
- Add unprefixed cursor: grabstyle (#6281 by Malvoz)
- Remove legacy prefixed styles, add unprefixed styles (#6282 by Malvoz)
Bug fixes
- Move set/getAttribute(‘src’) calls from GridLayerintoTileLayer(#6264 by IvanSanchez)
- Support comma- or space-separated strings in CanvasdashArrayoption (#6277 by IvanSanchez)
- Remove trailing commas to avoid crashes in some IE browsers (#6279 by helbling)
- Fixed capitalization of webkitTransformproperty, which broke transformations on certain Webkit browsers (#6290 by tuckergordon)
Docs & Web Site
- Document zoomControlmap option (#6254 by IvanSanchez)
- Explicitly note attribution obligation (#6261 by pietervdvn)
- Minor fixes of ImageOverlaydocs (#6266 by jgravois)
- Add Edge to the list of supported browsers (#6270 by matkoniecz)
- Remove references to Leaflet UserVoice page (#6291 by zstadler)
- Reword docstrings for draggable markers (#6296 by IvanSanchez)
1.3.3 (2018-07-18)
Bug fixes
- Remove modulefield frompackage.json(#6239)
1.3.2 (2018-07-17)
Improvements
- Add use-credentialsCORS option toImageOverlayandTileLayer(#6016 by caleblogan) + unit tests (#6022 and #6027 by ghybs)
- Clean up references to global Lin source code (#6047 and #6048 by ghybs)
- Allow reset of CanvasdashArrayoption + support array type (#6200 by McBen)
Bug fixes
- Respect the preferCanvasoption in all panes (#6019 by mjumbewu)
- Do not fire tileloadevent if tile has emptysrc(#6025 by cherniavskii)
- Fix race condition when removing canvas before it has rendered (#6033 by louMoxy)
- Fix memory leak in canvas renderer (#6117 by aj8k)
- Fix dragging for CSS scaled map (#6055 by ghybs)
- Handle Polygons with empty array ofLatLngs (#6119 by BakuCity)
- Fix view bounds calculation in geolocation event handler (#6140 by wladich)
- Fix error removing map and resizing window at the same time (#6160 by danzel)
- Stop pan key event when pan animation is in progress (#6231 by cherniavskii)
Docs & Web Site
- Use more explicit tiles in Map panesexample (#6018 by ghybs)
- Document parameter of closestLayerPointmethod (#6060 by mattdsteele)
- Update year ranges (#6076 by BakuCity)
- Use https everywhere for OSM links (#6082 by rzoller)
- Fix typo in VideoOverlay.jsexample docs (#6090 by zhuang-hao-ming)
- Fix typo in LatLngdocstring (#6138 by jieter)
- Use https everywhere and get rid of mixed content warnings (#6151 by theel0ja)
- More accurate Browser.retinaexplanation (#6203 by JLuc)
- Use link to official RFC 7946 GeoJSON spec (#6211 by ghybs)
ES6 / Rollup
- Add ES module build (#6021 by Rich-Harris)
Development workflow
- Move external dependencies to node_modules(#6028 by cherniavskii)
- Remove jakedependency and use NPM scripts instead (#5828 by cherniavskii)
- Update ssridependency to5.2.2(#6086 by cherniavskii)
- Set div width for getBoundsZoomparameterinside(#6192 by ghybs)
- Fix unit tests for graphical browsers (#6199 and #6202 by ghybs)
- Run tests in Firefox graphical browser as part of CI (#5831 by cherniavskii)
1.3.1 (2018-01-18)
Bug fixes
1.3.0 (2018-01-15)
API changes
- Add toleranceoption toL.Rendererinstead of hardcoded tolerance for touch devices (#5922 by Muscot).
Improvements
- Use more stable form of Haversine formula (#5935 by jussimattas)
- Add autoPanoption toL.Marker(#5651 by alenaksu)
- Cancel http requests for outdated tiles (#5615 by jbccollins)
- Add closeOnEscapeKeyoption toL.Popup(#5730 by Mickyfen17)
- Add tileerrortests toL.GridLayerspec (#5805 by msiadak)
- Use eachLayermethod for iterations over layers inL.LayerGroup(#5809 by cherniavskii)
- Change Util.formatNumdefault to 6 decimals (#5492 by fminuti)
- Fire zoomlevelschangeevent when callingsetMinZoom&setMaxZoom(#5230 by mynameisstephen)
- Use zoom parameter if passed to L.TileLayer’sgetTileUrlmethod (#5822 by broncha)
- Round circle radius in renderer instead of layer (#5859 by perliedman)
- Make L.LayerGroupaccept options (#5792 by iH8)
- Round pan offset towards zero (#5858 by perliedman)
- Improve heuristic for what event targets are considered markers (#5885 by perliedman)
- Add typeofcheck tocheckDeprecatedMixinEvents(#5901 by murb)
- Optimize images (#5936 by grischard)
- Add addTostatic function toL.Handlerclass (#5930 by cherniavskii)
- L.ImageOverlayaccepts- ImageElement(#5948 by ronikar)
Bug fixes
- Fix adding CSS classes in L.VideoOverlay, which caused map crash in IE8 (#5731 by Dzwiedzminator and #5785 by cherniavskii)
- No inertia if drag is stopped before ending the drag (#5690 by perliedman)
- Remove tiles from the _tilescache when they’re aborted (#5634 by oliverheilig)
- Use same condition for adding as well as removing double tap listener (#5598 by perliedman)
- Correctly wrap tile coordinate bounds (#5715 by perliedman)
- Fix L.TileLayerinfinite error loop (#5783 by cherniavskii)
- Fix map not rendering when images have max-height (#5778 by idanen)
- Add defensive check for this._mapinL.Marker’supdatemethod (#5736 by dnepromell)
- Fix zoom when map container is scaled (#5794 by cherniavskii)
- Update DomPointer.js to revert typo (#5817 by daverayment)
- Fix L.ImageOverlayclassNameoption (#5830 by cherniavskii)
- Fix L.TileLayer.WMSwhen using Polar stereographic (#5618 by scaddenp)
- Stop animation before removing map (#5876 by dnepromell and #5918 by aaronplanell)
- Stop locate before removing map (#5893 by ghybs)
- Reset GridLayer’s_tileZoomtoundefinedinstead ofnull(#5888 by iH8)
- Fix L.Map’smap.flyTomethod to respectnoMoveStartoption (#5923 by iPrytz)
- Fix map pan when touchZoomis disabled (#5952 by cherniavskii)
- Fix L.SVGto reset size on remove from map (#5966 by ghybs)
- Fix L.Markerto setaltattribute for img-based Icons only (#5979 by msiadak)
Docs & Web Site
- Add documentation for PolyLine.closestLayerPoint(#5701 by perliedman)
- Replace urls for samples in wms documentation (#5712 by jjimenezshaw)
- Add DomEvent.stopevent type to docs (#5733 by theashyster)
- Update links to GeoJSON spec in GeoJSON examples (#5725 by astridx)
- Improve docs for L.LatLngBoundspadmethod (#5748 by CalvinWilliams1012)
- Improve Zoom-levels documentation to reflect function properly (#5769 by CalvinWilliams1012)
- Fix map’s height and width in examples to make attributions visible on mobile (#5772 by CalvinWilliams1012 and #5819 by cherniavskii)
- Fix L.FeatureGroupbringToBackmethod docs (#5788 by fpopa)
- Fix L.LatLngdistanceTomethod description (#5791 by loisgh)
- Fix docs redirects to latest version reference (#5824 by cherniavskii)
- Add CDN alternatives (#5837 by ghybs)
- Update docs for L.DomEvent.off()(#5855 by 77ganesh and #5976 by kring)
- Move L.SVGfactory docs to appropriate place (#5864 by cherniavskii)
- New Leaflet playgrounds on Plunker, Codepen and JSFiddle (#5868 by iH8)
- Clarify that any option keys can be used (#5877 by perliedman)
- Add notes about some classes not inheriting Class (#5878 by perliedman)
- Clean up and document event propagation properties (#5880 by perliedman)
- Update building instructions (#5911 by shadeland)
- Document mouseupevent for interactiveL.Layer(#5941 by germansokolov13)
- Document L.Icon’stooltipAnchoroption, updatetooltipAnchorandpopupAnchordefault values docs (#5989 by cherniavskii)
ES6 / Rollup
- Tweak legacyoption in rollup config - now Leaflet works in IE again (#5929 by IvanSanchez)
- Remove warning alert in watch bundle (#5714 by perliedman)
- New rollup config signature (#5812 by iH8)
1.2.0 (2017-08-08)
API Changes
- Make L.LineUtil._flatpublic asL.LineUtil.isFlat(#5667 by yohanboniface)
- L.ImageOverlay’s- setBoundsmethod accepts an array of points, not only a- L.LatLngBoundsinstance (#5687 by ronikar
Improvements
- VideoOverlayaccepts- VideoElement(#5661 by eavidan-0)
- Documentation improvements by ghybs, thachhoang, colbin8r, Timmmm, cyrilf and JonDum
- Filter published files on npm (#5626 by TrySound), e7o-de
- Throw an error if trying to use addLayerwith something that is not aLayer(#5689 by perliedman)
- Ensure copyright banner is kept in the minified leaflet.js(#5682 by jgravois)
Bug fixes
- Fix non-extendable objects regression of 1.1.0 (#5658 by mourner)
- Control.Layersproperly handles adding the same layer multiple times, as well as cleanup (#5672, #5684 and #5673 by jjimenezshaw)
- Make L.Draggable._draggingpublic again (#5659 by yohanboniface)
- DomEvent.offreturns- this(#5601 by jelhan)
- Don’t use functions from the global Linternally (#5596 by atd-schubert)
- Return thisinstead ofaddOneinDomEvent.disableScrollPropagation(#5595 by Eschon)
1.1.0 (2017-06-27)
API changes
- Add deprecation notice for L.Mixin.Events, fixes #5358 (#5365) (by perliedman)
- Turn nonBubblingEventsinto a documented boolean option (#4883 by IvanSanchez)
- Add L.transformationfactory, allow creation from array (#5282 by anetz89)
- toGeoJSONmethods 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.htmlnow 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 ImageOverlaylayer and added tests for the new (#5416 by Saulzi)
- Add classNameoption forImageOverlay(#5555 by perliedman)
Bug fixes
- Handle edge case of empty bounds on _getBoundsCenterZoom(#5157 by IvanSanchez)
- Add new methods to L.Boundsfor 2 missing corners, fixes #5475 (#5488 by ghybs)
- Handle Polylines with empty array ofLatLngs, #5497 (#5498, by perliedman)
- Take devicePixelRatiointo 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.Eventsa simple object instead of a prototype so it doesn’t have a ‘constructor’ property, fixes #5451 (#5453 by luiscamachopt)
- Canvas: call ctx.setLineDashin_fillStroke#5182 (#5454 by TeXitoi)
- Only rearrange DOM in toFront/toBackif 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 ImageOverlayfor 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 lastIdinUtil(#5349 by DenisCarriere)
- Do not stop keypress on escape if no popup is open, plus unit tests (#5331 (by IvanSanchez)
- Docs: remove iframeborders on examples (#5327) (by tariqksoliman)
- Pull min/maxNativeZoomfromTileLayerintoGridLayer, 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.equalsmethod (#5071 by miguelcobain)
- Add L.Draggableoptions 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.draggingwhen not on the map, fixes #5293 (#5295 by danzel)
- Stop scroll propagation in L.Layers.Controlin chrome>55 (#5280 by IvanSanchez)
- Allow HTML inputs in layer control’s labels, fixes #5116 (#51165544 by iZucken)
- Fix possible null reference when auto detecting icon default path, fixes #5534 (#5535 by williamscs)
- Don’t turn enter keypress into map clicks, fixes #5499 (#5507 by perliedman)
- Use minus character instead of hyphen in the zoom control (#5501 by damianmoore)
1.0.3 (2017-01-23)
Bug fixes
- Avoid extra L.Canvasredraws on several scenarios (by @perliedman, #5250, also thanks to @manubb for investigation and PR).
- Fix behaviour of dblclickevents in Chrome 55 due toPointerEvents (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.VMLfor IE8 (by @IvanSanchez, #5215).
- Fix a race condition when closing popups during their popupopenevent (by @hagai26, #5202).
- Fix getBoundsZoomreturn value on CRSs with a flipped axis (by @computerlove, #5204).
- Avoid infinite loops when the errorTileUrlof aL.TileLayerreturns 404 (by @IvanSanchez, #5177).
- Remove erroneous initialization of unused event listeners (by @Brikky, #5160).
- Fix rounding of L.Canvasredraw areas to avoid artifacts during partial updates (by @Ernie23, #5148).
- Fix isPopupOpen()behaviour ofL.Layerwhen no popup is bound to a layer (by @gvangool, #5106).
- Add a sanity check in LatLngBounds.contains()to allow for non-instantiatedLatLngobjects (by @IvanSanchez, #5135).
- Fix collapsing of L.Control.Layerswhen thecollapseoption isfalse(by @perliedman, #5131).
API changes
- Added a new WrapLatLngBoundsmethod toL.CRS, to fix an issue withmaxBoundsofGridLayers (by @IvanSanchez, #5185, also thanks to @DiogoMCampos for investigation).
- L.Map.getSize()will now return- 0instead of- NaNin non-graphical environments (by @ughitsaaron, #5209).
Improvements
- Several minor documentation improvements by @IvanSanchez, @jieter, @alonsogarciapablo, @jasonoverland, @danzel, @ghybs, @Ralf8686, @geoloep
- Add an altattribute to the<img>s of marker shadows (by @topicus, #5259).
1.0.2 (2016-11-21)
Bug fixes
- Fix CSS for marker shadows when max-widthis already set (by @brunob, #5046).
- Fix canvas redraw when style updates fill and/or weight (by @perliedman, #5034).
- Prevent canvas from firing multiple mouseoverevents for same layer (by @perliedman, #5033).
- Fixed a race condition when removing and adding L.Canvasvectors 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 FeatureCollections (by @IvanSanchez), #5045.
- Fix minZoom/maxZoomlate inizialization (by @IvanSanchez), #4916.
- Fix styling of custom SVG markers by making stricter CSS selectors (by @jwoyame) #4597.
- Fix order of mouseover/mouseoutevents on overlappingL.Canvaslayers (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), #5131.
- Fix blurriness of L.Tooltipby rounding up pixel coordinates (by @ashmigelski), #5089.
- Fix click events on overlapping geometries when using L.Canvas(by @perliedman), #5100.
API changes
- Add a sortLayersoption toL.Control.Layers(by @IvanSanchez, #4711.
- Implement bringToFrontandbringToBackwhen usingL.Canvas, plus preventing other canvas glitches (by @perliedman), #5115.
- Add minNativeZoomoption toL.TileLayers. (by @bb-juliogarcia), #5088.
Improvements
- Improve performance when adding lots of L.Paths by refactoring away event logic (by @IvanSanchez) #5054)].
- Several minor documentation improvements by @Jmuccigr, @serdarkacka, @erickzhao, @IvanSanchez, @perliedman, @joukewitteveen.
- Code reorganization: Extensions for L.MarkerandL.Mapno longer have a separate file (by @mourner).
- Removed a duplicated unit test (@yohanboniface).
- Accesibility improvements (ARIA/screenreader related) on map tiles (by @patrickarlt) #5092.
1.0.1 (2016-09-30)
Bug fixes
- Fixed vector rendering regression in IE8 (by @perliedman) #4656.
- Fixed Webpack error when bundling Leaflet’s CSS (by @jefbarn) #4679.
1.0.0 (2016-09-26)
API changes
- Remove deprecated zoomanimatedoption forL.Popups (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.Icondefault path using CSS (by @IvanSanchez) #4605
Bug fixes
- Fix handling of getScaleZoomin some custom CRSs (by @theashyster) #4919
- Guard L.Pathevent handlers against race conditions (by @perliedman and @IvanSanchez) #4855 #4929 #4838
- In L.GridLayers, wraptileBoundswhennoWrapis 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.Polygonhas no map and thus no CRS (by @snkashis) #4820
- Add a _leaflet_idto 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
1.0-rc3 (2016-08-05)
API changes
- L.Tooltip- offsetoption 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.Tooltipzoom animation (by @yohanboniface) #4744
- Fixed layer.bindTooltipcrashing when called before adding the layer to the map (by @yohanboniface) #4779
- Fixed regression in L.Popupautopaning (by @yohanboniface) #4768
- Fixed non permanent L.Tooltipnot being closed on touch when touching the map (by @yohanboniface) #4767
- Fixed popupopenandpopupclosenot being fired when clicking on path with an open popup (by @yohanboniface) #4788
1.0-rc2 (2016-07-18)
API changes
- Make L.Handler.enable/disablereturnthis(by @yohanboniface) #4708
- Icon sizeoption can now be initialised with a number (by @rheh) #4608
- Add classnameoption toL.GridLayer(by @jayvarner) #4553
- Consistent returns for Map.addLayer(by @nathancahill) #4504
- Create points from objects with xandyproperties (by @nathancahill) #4465
- Add updateWhenZoomingoption toL.GridLayer(by @IvanSanchez) #4462
Improvements
- Refactoring of events (by @fab1an and @perliedman) #4697
- Do not alter popup.options.offsetwhen computing popup offset (fix #4645) (by @yohanboniface) #4662
- Use different L.Boundsfor “marking as prunable” and loading tiles (by @IvanSanchez) #4650
- Added L.Tooltipclass 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: visiblePaintedas fallback for IE <11 (by @perliedman) #4690
- Avoid double borders on abbrin 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 getBoundsZoomwith small size and padding (by @dianjin) #4532
- Fixed L.Control.Layersin IE8 (by @jieter) #4509
- Fixed TileLayer’s retina logic whenzoomReverseis enabled. (by @perliedman) #4503
- Fixed setMaxBoundsnot resettingmaxBoundswhen passingnullargument (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 markerZoomAnimationevent hooks (by @IvanSanchez) #4460
1.0-rc1 (2016-04-18)
API changes
- Make L.Control.Layers.collapse/expandpublic methods (by @yohanboniface) #4370
- Make L.latLngBoundsfactory return an empty bounds with no argument (by @yohanboniface) #4368
- Map.fitBoundsnow raises an error if bounds are not valid (by @theotow) #4353
- Temporarily support legacy options on L.Circle(by @JrFolk) #4290
- Throw error on NaNcircle radius (by @IvanSanchez) #4237
- L.Class.include()&- mergeOptions()now return- this(by @IvanSanchez) #4246
- Consistent GeoJSON casing (by @yohanboniface) #4108
- Move L.LatLng.equalstoL.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 dashArraypath option in canvas (by @gommo) #4173
- Clean up navigator.pointerEnabled(by @IvanSanchez) #4287
- Use array in L.Control.Layersinternally (by @jieter) #4227
- Implement L.Browser.edge(by @IvanSanchez) #4143
- Optimized icons (by @vtduncan) #4124
- Cast L.DivIcon.bgPosoption 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.lengthundefined 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.Layerthat is not on the map (by @errebenito) #4280
- Fixed Map.attributionControlonly set onaddInitHook(by @snkashis) #4263
- Check for e.originalEventinDomUtil._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.fadeAnimationandGridLayer.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 pxBoundsvalidity before using it (by @yohanboniface) #4191
- Disable event defaults when disabling scroll propagation (by @IvanSanchez) #4160
- Fixed precision issues in L.Circleradius (by @IvanSanchez) #4133
- Workarounded some touch-capable browsers firing dblclickinstead 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 undefinedproperty (by @robertleeplummerjr) #4113
- Fixed retina URL computation (by @hyperknot) #4110
- Fire tileunloadfor 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.Layerswhere callingmap._sizeinstead 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 maxZoomnot 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) #3998
- L.Marker: init interaction regardless of new icon or not (by @celadevra) #3978
- Fix interactive=falsenot 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
1.0-beta2 (2015-10-14)
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.circlenow accepts- radiusas an option (like- L.circleMarker) rather than a second argument (by @IvanSanchez)
Improvements
- Implemented canvas optimizations on mousehover interactions (by @philippelatulippe) #3076
- Improved drag behaviour by preventing a preclickevent during drag (by @yohanboniface) #3632
- Implemented L.ImageOverlay.setBounds()and fixed image overlay initialization (by @fminuti) #3680
- Implemented draggable items to fire mousedownevents (by @yohanboniface) #3682
- Changed detection of browsers capable of msPointerevents (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 bringToFrontandbringToBackto 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 preventOutlineexceptions #3625
- Fixed a box zoom regression bug #3633
- Fixed contextmenubehaviour 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 mouseoutandmouseoverevent 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 flyToanimations when the map center doesn’t change (by @fminuti) #3663
- Fixed fade animations for semitransparent tile layers (by @w8r) #3671
- Fixed behaviour of the baselayerchangeevent (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.requestAnimFramedefinition (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 maxZoomis 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 noWrapoption 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
1.0-beta1 (2015-07-14)
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 Rendererlayer (inherited by SVG/Canvas implementations) that handles renderer bounds and zoom animation.
- Added SVG&Canvasclasses 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 asrendererin options;
- Removed MultiPolylineandMultiPolygonclasses since multiple rings are now handled byPolylineandPolygonclasses respectively. Layers with multiple rings now perform much better (since each is now physically a single path object instead of being aFeatureGroupof 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 PolylineandPolygongetCenterfor getting centroids.
- Respectively, improved PolylineandPolygonpopup positioning when callingopenPopup.
- Improved Polyline/PolygongetBoundsto be cached (so it works much faster).
- Changed Circleto inherit fromCircleMarkerand not the other way.
- Fixed GeoJSONresetStyleto work properly in casestyleoption wasn’t set.
- Fixed a bug where map fired moveendwhen updating Canvas layers.
- Removed PolylineandPolygonspliceLatLngsmethod (just usesetLatLngsinstead).
- Changed PolygongetLatLngsto 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 fillRuleoption (by @bullgare). #2834
- Removed L_PREFER_CANVASglobal switch and addedMappreferCanvasoption 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 Layerclass which all layers added to a map should inherit from.
- Added addandremoveevents to all layers.
- Added removemethod to layers and controls (marker.remove()is now equivalent tomap.removeLayer(marker)).
- Improved performance of adding and removing layers.
- Added paneoption to all layers that can be changed (e.g. you can setpane: 'overlayPane'to a tile layer).
- Added mapcreatePanemethod for custom panes. #1742
- Simplified map panes — removed objectsPane, all panes are on the same level now.
- Added shadowPaneoption to markers as well.
- Added getEventsmethod 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,isPopupOpenmethods 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 FeatureGroupgetBoundsto work correctly when containing circle markers.
- Removed Maptilelayersloadevent.
- Removed Popupopenandcloseevents in favor ofaddandremovefor consistency.
- Moved all layer-related logic in Map.jstoLayer.js.
- Improved FeatureGroupbindPopupto 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 ImageOverlayinteractivity (mouse events, etc.) (by @snkashis). #3009 #1727
- Added ImageOverlaygetBounds(by @brunob). #2848
- Renamed clickableoption 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 nonBubblingEventsoption 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 TileLayerlogic into the newGridLayerclass (whichTileLayernow inherits, extending it with logic specific to tile servers).
- Removed TileLayer.Canvasin favor of the much more flexible and powerfulGridLayer.
- Improved tile wrapping and bounding logic in TileLayerto work transparently and completely depent on the CRS used; removed the need forTileLayerhacks when using custom projections.
- Added non-square tiles support (by @IvanSanchez). #3573 #3570
- Removed urlproperty intileloadandtileloadstartevents (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.Earthwhich serves as a base for all Earth-based CRS (EPSG3857etc.). #2345
- Added Projectionboundsproperty that defines bounds for different projections (Mercator, etc.) in projected coordinates (by @perliedman).
- Added CRSwrapLatandwrapLngproperties which define whether the world wraps on a given axis and in what range. Set as[-180, 180]forEPSG:3857,EPSG:4326,EPSG:3395by default.
- Added CRSandMapwrapLatLng(the latter depends on the chosen CRS).
- Added CRSinfiniteproperty that disables boundaries (the world can go on infinitely in any direction), default forCRS.Simple.
- Added CRSgetProjectedBoundsandMapgetPixelWorldBoundsmethods that returns world bounds in projected coordinates depending on zoom (derived fromProjectionbounds) (by @perliedman).
- Added CRSunprojectmethod that converts coordinates in CRS-dependent units intoLatLngcoordinates (by @sowelie).
- Added Mapdistance(latlng1, latlng2)method that takes CRS into account and works with flat projections. #2345 #1442
- Improved Circleto be approximated with an ellipse in Earth-based projections. #2345
- Fixed EPSG:4326to have correct tile pyramid (2x1 tiles at root).
- Fixed Projection.SphericalMercatorto project to meter units (by @calvinmetcalf).
- Fixed MapworldCopyJumpoption to work for other projections.
- Fixed Circleto work with flat projections. #2345 #1465
- Fixed scale control precision in non-EPSG:3857 projections. #2345
- Fixed ImageOverlaynot 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 zoomevent in addition toviewresetfor 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 LatLngcreation 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 Eventedoffperformance by about 2 times.
Other breaking API changes
- Changed DomUtiloffto requirecontextattribute if you remove a listener that was previously added with a particular context.
- Removed DomUtil.getViewportOffsetmethod as it is no longer necessary.
- Removed DomUtilgetTranslateStringandgetScaleStringmethods.
- Removed DomUtildocumentIsLtrmethod.
- Removed LatLngRAD_TO_DEG,DEG_TO_RADandMAX_MARGINconstants.
- Renamed Util.limitExecByIntervaltoUtil.throttle.
Other API improvements
- Added Eventedclass that now many Leaflet classes inherit from (instead of mixing in events methods in each class), while keeping the oldincludes: L.Mixin.Eventssyntax available. #2310
- Improved Classoptionsto 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 toTileLayerurlfor adding"@2x"prefix on Retina-enabled devices (by @urbaniak). #2296
- Added Pointceilmethod (by @perliedman).
- Added Util.wrapNummethod for wrapping a number to lie in a certain range.
- Improved L.bindto use nativeFunctionbindon modern browsers and prepend real arguments to bound ones.
- Added LatLngequalssecond argumentmaxMargin.
- Added DomUtilsetClassandgetClassmethods.
- Improved Markermoveevent to includeoldLatlng(by @danzel). #2412
- Added Markermousemoveevent (by @bullgare). #2798
- Improved DomEventon/offto accept space-separated events and object literals ({type: fn}).
- Added DomUtiltoFrontandtoBackmethods.
- Added Eventedlistensas a shortcut tohasEventListeners.
- Added optional support for center-oriented scroll for L.mapoptiontouchZoom(by @mtmail). #2527
- Added getElementmethod to all layers that returns an associated DOM element.
- Added LatLngclonemethod (by @yohanboniface). #3390
- Added MapsetMinZoomandsetMaxZoommethods (by @nathancahill). #3383 #3380
- Added originalEventtoMapandMarkerdragandmoveevent data (by @yohanboniface). #3264
- Added PopupautoCloseoption (by @jfirebaugh). #3018 #2716 #1853
- Added Control.Zoomenableanddisablemethods. #3172
- Added an argument to L.PolyUtil.clipPolygonthat controls rounding (by @aparshin). #2926 #2917
- Added MapwheelDebounceTimeoption (by @AndriiHeonia). #2836 #2501
- Added TileLayer.WMSuppercaseoption (nowfalseby default) (by @kdeloach). #2831 #1751
- Added ImageOverlayaltoption (by @francis-liberty). #2767 #2564
- Improved L.Util.extendperformance (by @fab1an). #2746
- Added Mapstopmethod for stopping panning orflyToanimation.
- Added MapmaxBoundsViscosityoption that controls how much the map resits dragging out of max bounds (set to1for a hard limit) (by @IvanSanchez). #2224 #3510 #1673
- Added BoundsandLatLngBoundsoverlapsmethod (by @IvanSanchez). #2981 #3508
- Added ImageOverlaycrossOriginoption (by @patrickarlt). #3594 #2621
Bugfixes
- Fixed DomUtilonto 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 ImageOverlaymercator distortion on lower zoom levels.
- Fixed a bug where layers didn’t fire popupopenandpopupcloseevents when manually creating a popup object and passing it tobindPopup. #2354
- Fixed box-zoom overlay appearing under markers. #1813
- Fixed MappanInsideBoundsto 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 LatLngwrapto not drop altitude (by @IvanSanchez). #3420
- Fixed Firefox for Android not being detected as mobile (by @IvanSanchez). #3419
- Fixed an infinite loop when calling setMaxBoundsseveral times in a row (by @IvanSanchez). #3410 #3320
- Fixed a WTF Maplocatebug that could cause some unexpected effects (by @sindre). Leaflet/Leaflet#3404
- Fixed broken zoom in Project Spartan browsers (by @mitchless). #3379
- Fixed broken PolygongetCenterwhen all points </area> in the same pixel (by @yohanboniface). #3372
- Fixed broken PolylinegetCenterwhen the line is very small (by @yohanboniface). #3371
- Fixed keyboard zoom out not working on azertykeyboards. #3362
- Fixed a bug where tabbing to an offscreen marker broke control positioning (by @IvanSanchez). #3340 #3333
- Fixed MappanBynot 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 PolygontoGeoJSONexporting aMultiPolygonin some cases (by @yohanboniface). #2977
- Fixed TileLayer.WMSpassing 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 TileLayerwhenmaxNativeZoom = 0. #3004
- Fixed FeatureGroupsetStylenot affectingImageOverlayopacity(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 MapworldCopyJumpoption is enabled (by @flemenach). #3038 #2624
- Fixed a bug where getMaxZoomsometimes returned wrong result inside aControl.Layersbaselayerchangeevent (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 MapgetSizerace condition where it could return a wrong result (by @kshepard). #3052 #3031
- Fixed L.latLngfactory to acceptaltitudeas a third argument too (by @lonelyelk). #3070.
- Fixed L.latLngfactory 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 Maplocatenot 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 MarkersetIconto not reset popup anchor offset (by @bullgare). #2872
- Fixed a case where you provide zoominMapoptions and then set center (by @AndriiHeonia). #2849 #1871
- Fixed a race condition with TileLayersetUrlwhereloadingevent 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 MarkersetIcon(by @jfgodoy). #2811
- Fixed LatLngdistanceToto not returnNaNon equal locations. #2705
- Fixed a bug where TileLayermaxNativeZoomdidn’t work properly withboundsoption 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
0.7.7 (2015-10-26)
- 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.
0.7.5 (2015-09-02)
- Fixed a regression that broke animation in Leaflet.markercluster. #3796
0.7.4 (2015-09-01)
- 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 minZoomormaxZoomoptions (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 maxNativeZoomwere 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.fitBoundspadding (by @bsstoner). #2489
- Allow canvas paths to fire dblclickandcontextmenuevents (by @ivansanchez) #3482
- Allow canvas filled polygons to use the fillRuleoption (by @w8r) #3477
- Allow canvas lines to use lineCapandlineJoinoptions (by @northerneyes) #3156
- Updated bower definitions to comply with best practices (by @guptaso2) #2726 #3448
0.7.3 (2014-05-23)
- 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.Layerswasn’t properly removed (by @jack-kerouac). #2569
- Fixed a bug that caused TileLayerloadevent not to fire properly. #2510
- Fixed Canvas-based paths not triggering removeevent 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
0.7.2 (2014-01-17)
- 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 maxNativeZoomoption didn’t work with TMS tile layers (by @perliedman). #2321 #2314
0.7.1 (2013-12-06)
- 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.templateoptimizations 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 MapinvalidateSizecould lead to unexpected results when called before map initialization (by @Zverik). #2250 #2249
- Fixed a regression where FeatureGroupcontaining other group overwrote originale.layervalue in mouse events (by @gumballhead). #2253 #2252
- Fixed a regression where CircleMarkersetLatLngsdidn’t returnthis(by @radicalbiscuit). #2206
0.7 (2013-11-18)
Improvements
Usability improvements
- Added support for IE11 touch devices (by @danzel, @DanielX2 and @fnicollet). #2039 #2066 #2037 #2102
- Added shift-double-click to zoom out shortcut. #2185
- Significantly improved controls design on mobile devices. #1868 #2012
- Fixed and improved IE7-8 control and popup styles.
- Made subtle improvements to control styles on desktop browsers.
- Improved keyboard nav support so that map doesn’t loose focus when you click on a control (by @jacobtoye). #2150 #2148
- Improved maxBoundsbehavior: now it doesn’t force higher minimal zoom, and anchors to max bounds edges properly when zooming (by @kapouer and @mourner). #2187 #1946 #2081 #2168 #1908
Map API improvements
- Made MapsetViewzoomargument optional. #2056
- Added maxZoomoption toMapfitBounds. #2101
- Added MapbounceAtZoomLimitsoption that makes the map bounce when you pinch-zoom past limits (it worked like this before, but now you can disable this) (by @trevorpowell). #1864 #2072
- Added distanceproperty toMapandMarkerdragendevents. #2158 #872
- Added optional support for center-oriented scroll and double-click zoom (by @jfirebaugh). #1939
- Added timestamptoMaplocationfoundevent. #584
- Improved MapinvalidateSizeto callmoveendimmediately unless givendebounceMoveend: trueoption (by @jfirebaugh). #2181
TileLayer API improvements
- Added TileLayermaxNativeZoomoption that allows displaying tile layers on zoom levels above their maximum by upscaling tiles. #1802 #1798
- Added TileLayertileloadstartevent (by @tmcw). #2142 #2140
- Improved TileLayerworld size (used for wrapping and limiting tiles) to be derived from CRS instead of hardcoded, making it easier to use with custom projections (by @perliedman). #2160
Marker API improvements
- Added CSS classes to draggable markers for easier customization (by @snkashis). #1902 #1916
- Added Markeraddevent (by @tohaocean). #1942
- Added MarkergetPopupmethod (by @scottharvey). #618 #1197
- Added Markeraltoption for addingalttext to markers (by @jimmytidey). #2112
Vector layers API improvements
- Added PathclassNameoption for adding custom class names to vector layers.
- Added PathlineCapandlineJoinoptions (by @palewire). #1843 #1863 #1881
- Added ability to pass vector options to GeoJSON(by @kapouer). #2075
- Improved PolygonsetLatLngsto also accept holes (by @aparshin). #2095 #1518
- Added GeoJSON3D format support and optionalaltitudeargument toLatLngconstructor (by @Starefossen). #1822
- Added MultiPolygonandMultiPolylineopenPopupmethod. #2046
Popup API improvements
- Added Popupupdatemethod. #1959
- Added PopupautoPanPaddingTopLeftandautoPanPaddingBottomRightoptions (by @albburtsev). #1972 #1588
- Added PopupgetContentmethod. #2100
- Added PopupgetLatLngmethod (by @AndreyGeonya). #2097
Misc API improvements
- Added ImageOverlaysetUrlandgetAttributionmethods andattributionoption (by @stsydow). #1957 #1958
- Added localization support for the zoom control (by @Danielku15). #1953 #1643 #1953
- Significantly improved L.Util.templateperformance (affectsL.TileLayer) by introducing cached template compilation (by @calvinmetcalf). #1969 #1968 #1554
- Added CRSgetSizefor getting the world size in pixels (by @perliedman). #2160
- Added leaflet-drag-targetCSS class to an element under cursor when dragging for more flexible customization. #2164 #1902
- Improved L.DomUtiladdClass,removeClass,hasClassmethods performance and fixed it to work with SVG elements. #2164
Dev workflow improvements
- Added an official FAQ.
- Cleaned up and moved old IE styles to leaflet.cssand removedleaflet.ie.css, so no need for IE conditional comment when including Leaflet now. #2159
- Added leaflet-oldieCSS class to map container in IE7-8 for easier styling. #2159
- Officially dropped support for IE6. Nobody cares anyway, and Leaflet should still be accessible on it. #2159
- Improved the build system to check JS errors in spec files. #2151
- Fixed jakecommand to run tests before building the source. #2151
- Switched the main file in package.jsonto unminified version for NPM/Browserify (by @icetan). #2109
Bugfixes
0.6 regression fixes
- Fixed a memory leak in iOS7 that could crash Safari when handling lots of objects (e.g. 1000 markers) (by @danzel). #2149 #2122
- Fixed a bug that caused lag at the beginning of panning in Chrome (by @jfirebaugh). #2163
- Fixed a regression that made the layers control unscrollable in Firefox. #2029
- Fixed a regression that broke worldCopyJump: trueoption (by @fastrde). #1904 #1831 #1982
- Fixed a regression where a first map click after popup close button click was ignored (by @fastrde). #1537 #1963 #1925
- Fixed a regression where L.DomUtil.getMousePositionwould throw an error if container argument not provided (by @scooterw). #1826 #1928 #1926
- Fixed a regression with vector layers positioning when zooming on IE10+ touch devices (by @danzel). #2002 #2000
- Fixed a regression with maxBoundsbehaving weirdly on panning inertia out of bounds. #2168
General bugfixes
- Fixed a bug where the map could freeze if centered and immediately recentered on initialization. #2071
- Fixed a bug where all maps except the first one on a page didn’t track window resize. #1980
- Fixed a bug where tiles in EPSG:3395projection were shifted (by @aparshin). #2020
- Fixed a bug where scale control displayed wrong scale when on pages with box-sizing: border-box.
- Fixed a bug where zoom control button didn’t appear as disabled if map was initialized at the zoom limit. #2083
- Fixed a bug where box zoom also triggered a map click event (by @fastrde). #1951 #1884
- Fixed a bug where shift-clicking on a map immediately after a drag didn’t trigger a click event (by @fastrde). #1952 #1950
- Fixed a bug where content was updated twice when opening a popup. #2137
- Fixed a bug that could sometimes cause infinite panning loop when using maxBounds(by @kapouer and @mourner). #2187 #1946 #2081 #2168 #1908
Browser bugfixes
- Fixed a bug where keyboard +no longer zoomed the map on FF 22+ (by @fastrde). #1943 #1981
- Fixed a bug where calling Mapremovethrowed an error in IE6-8. #2015
- Fixed a bug where isArraydidn’t work in rare cases in IE9. #2077
- Fixed a bug where FF sometimes produced console warnings when animating markers. #2090
- Fixed a bug where mouse wasn’t handled correctly on RTL pages in some cases (by @danzel). #1986 #2136
Mobile bugfixes
- Fixed a bug where tiles could disappear after zooming on Chrome 30+ for Android (by @danzel). #2152 #2078
- Fixed a bug on IE10+ touch where pinch-zoom also caused click (by @danzel). #2117 #2094
- Fixed a bug on IE10+ touch where controls didn’t loose the pressed state after tapping (by @danzel). #2111 #2103
- Fixed a bug where clicking on layers control labels on iOS throwed an error (by @olemarkus and @dagjomar). #1984 #1989
Map API bugfixes
- Fixed a bug where MapgetCenterreturned old result after map container size changed (by @jfirebaugh). #1940 #1919
- Fixed MapinvalidateSizerounding issues when changing map size by an odd pixel amount (by @russelldavis). #1931
- Fixed a bug where MapremoveLayerdidn’t returnthisin a corner case (by @jfirebaugh).
- Fixed a bug where calling MapsetZoombeforesetViewwould throw an error. #1449
Layers API bugfixes
- Fixed a bug where PopupsetLatLngunnecessarily reset content and updated layout; works much faster now. #2167
- Fixed a bug where toGeoJSONof layers originated from GeoJSON GeometryCollection and MultiPoint didn’t work properly (wasn’t round-tripped). #1956
- Fixed GeoJSONdependencies in build configuration that could lead to a broken custom build in some situations (by @alubchuk). #1909
- Fixed a bug where CircleMarkerpopup placement wasn’t updated after callingsetLatLng(by @snkashis). #1921 #1927
- Fixed a bug where popup anchor wasn’t updated on MarkersetIcon(by @snkashis). #1874 #1891
- Fixed a bug with GeoJSON not throwing a descriptive error if a polygon has zero length inner ring (by @snkashis). #1917 #1918
- Fixed a bug where FeatureGroupwould break when using non-evented children layers (by @tmcw). #2032 #1962
- Fixed a bug where CircleMarkergetRadiuswould always returnnull. #2016 #2017
- Fixed a bug where TileLayer.WMSdidn’t work with WMS 1.3 & EPSG4326 projection (by @Bobboya). #1897
- Fixed a bug where FeatureGroupeventse.layerwas sometimes empty in old IE. #1938
Misc API bugfixes
- Fixed a bug where L.latLngBoundsdidn’t accept simple objectLatLngform (by @Gnurfos). #2025 #1915
- Fixed a bug where L.Util.tempalatewouldn’t work with double quotes in the string (by @jieter). #1968 #2121 #2120
- Fixed a bug where attribution control that was added to a map after attributed layers didn’t have the corresponding attributions (by @snkashis). #2177 #2178
0.6.4 (2013-07-25)
- Fixed a regression where fitBoundsandsetMaxBoundscould freeze the browser in some situations. #1895 1866
- Fixed a bug where click on a map on a page with horizontal scroll caused the page to scroll right (by @mstrelan). #1901
0.6.3 (2013-07-17)
Regression fixes
- Fixed a regression where mouse interaction had incorrect coordinates in some map positioning cases (by @scooterw). #1826 #1684 #1745 #1
- Fixed a regression that prevented the map from responding to drag on areas covered with ImageOverlay(by @jfirebaugh). #1821
- Fixed a regression where layerremoveandlayeraddwere fired before the corresponding action finishes (by @jfirebaugh). #1846
- Fixed a regression with worldCopyJump: truebreaking the map on small zoom levels (by @danzel). #1831
- Fixed a regression where Markershadow didn’t animate on zoom after usingsetIcon. #1768
- Fixed a regression where the map would stuck when trying to animate zoom before any tile layers are added to the map. #1484 #1845
- Fixed a regression with the layers control and popups closing on inside click in IE < 9. #1850
- Fixed a regression where scrolled popup content woudln’t scroll in FF (by @jfirebaugh).
Bug fixes
- Fixed vector feature flickering on Safari Mac for screen < 2000px. #902
- Fixed a bug where GeoJSONignored non-feature geometries passed in an array. #1840
- Fixed a bug where MapminZoomandmaxZoomdidn’t always override values derived from the added tile layers. 1848
- Fixed a bug where TileLayer.Canvaswasn’t immediately redrawn whenredrawis called (by @tofferrosen). #1797 #1817
- Fixed a bug where FeatureGroupstill firedlayerremoveevent onremoveLayereven if the given layer wan’t present in the group (by (by @danzel)). #1847 #1858
- Fixed a bug where MarkersetOpacitywasn’t returning the marker (by @freepius44). #1851
- Fixed a bug where removing the map element from the DOM before panning transition has finished could keep a setInterval loop running forever (by @rutkovsky). #1825 #1856
- Fixed mobile styles to apply to leaflet-barelements.
Improvements
- Added ability to pass zoom/pan animation options to setMaxBounds(by @davidjb). #1834
- Added MultiPolylineandMultiPolygongetLatLngsmethod. #1839
Dev Workflow improvements
- Leaflet builds (*.js files in the distfolder) were removed from the repo and are now done automatically on each commit formasterandstablebranches by Travis CI. The download links are on the Leaflet download page.
0.6.2 (2013-06-28)
- Fixed a bug that caused wrong tile layers stacking order when using opacity < 1 (by @jfirebaugh). #1804 #1790 #1667
- Fixed a regression that caused tiles selection when double-clicking absolutely positioned maps with vector layers in it in Firefox (WTF!) (by @jfirebaugh). #1807
- Fixed a regression with a wrong cursor when dragging a map with vector layers, and tiles becoming selected on double click (by @jfirebaugh). #1800
- Fixed a regression that caused flickering of tiles near map border on zoom animation in Chrome.
0.6.1 (2013-06-27)
- Fixed a regression with mouse wheel zooming too fast on Firefox (by @jfirebaugh). #1788
- Fixed a regression with broken zooming on maps with EPSG3395 projection. #1796
- Fixed a bug where zoom buttons inherited Bootstrap link hover styles. #1791
0.6 (2013-06-26)
Breaking changes
- Moved polyline editing code into Leaflet.draw plugin (where it fits much better along with all other editing and drawing handlers). The API remains the same.
- Dropped support for environments that augment Object.prototype(luckily it’s a thing of the past nowadays).
- Map- invalidateSizeno longer fires- moveand- moveendevents if the map size didn’t change. #1819
Improvements
Usability and performance improvements
- Improved zoom control design - cleaner, simpler, more accessible (mostly by @jacobtoye). #1313
- Updated Control.Layersicon (designed by Volker Kinkelin), added retina version and SVG source. #1739
- Added keyboard accessibility to markers (you can now tab to them and press enter for click behavior). #1355
- Improved TileLayerzoom animation to eliminate flickering in case one tile layer on top of another or when zooming several times quickly (by @mourner with lots of fixes from @danzel). #1140 #1437 #52
- Subtly improved default popup styles
- Improved attribution control to be much less obtrusive (no “powered by”, just a Leaflet link). You can still remove the prefix with map.attributionControl.setPrefix('')if you need.
- Improved zoom behavior so that there’s no drift of coordinates when you change zoom back and forth without panning. #426
- Improved double click behavior to zoom while keeping the clicked point fixed (by @ansis). #1582
- Improved dragging behavior to not get stuck if mouse moved outside of an iframe containing the map (by @jfirebaugh). #1277 #1782 #1786
- Improved box zoom to be cancelable by pressing Escape (by @yohanboniface). #1438
- Improved Markerpopups to close on marker click if opened (by @popox). #1761
- Significantly improved mass layer removal performance (by @jfgirard with fixes from @danzel). #1141 #1514
API improvements
Layers API improvements
- Added toGeoJSONmethod to various layer types, allowing you to save your Leaflet layers as GeoJSON. (by @jfirebaugh). #1462 #712 #1779
- Added GeoJSONcoordsToLatLngoption for dealing with GeoJSON that has non-WGS84 coords (thanks to @moonlite). #888 #886
- Improved Markerto reuse icon DOM elements when changing icons on the fly (e.g. fixes problems when changing icon on mouse hover) (by @robpvn & @danzel). #1726 #561 #1753 #1754
- Added latlngproperty toMarkermouse event data. #1613
- Added LayerGrouphasLayermethod (by @rvlasveld). #1282 #1300
- Added LayerGroupgetLayersmethod (by @tmcw). #1469
- Added LayerGroupgetLayermethod (by @gumballhead). #1650
- Improved LayerGroupremoveLayermethod to also accept layerid(by @gumballhead). #1642
- Added PathpointerEventsoption for setting pointer-events on SVG-powered vector layers (by @inpursuit). #1053
- Improved Polygonto filter out last point if it’s equal to the first one (to fix GeoJSON polygon issues) (by @snkashis). #1153 #1135
- Improved paths with clickable: falseto allow mouse events to pass through to objects underneath (by @snkashis). #1384 #1281
- Improved L.Util.template(and correspondingly url-relatedTileLayeroptions) to support functions for data values (by @olegsmith). #1554
- Added TileLayergetContainermethod (by @tmcw). #1433
- Fixed TileLayer.Canvasredrawmethod chaining (by @jieter). #1287
- Added TileLayer.WMScrsoption to be able to use WMS of CRS other than the map CRS (by @kengu). #942 #945
- Added popupopenandpopupcloseevents to various layers (by @Koc). #738
- Added PopupkeepInViewoption (thanks to @lapo-luchini) that prevents the popup from going off-screen while it’s opened. #1308 #1052
- Added MarkertogglePopupmethod (by @popox). #1761
- Added PopupcloseOnClickoption that overrides the sameMapoption for specific popups (by @jfirebaugh). #1669
- Improved MarkerandPathbindPopupmethod to also acceptPopupobjects (by @snkashis). #1385 #1208 #1402
- Added MarkersetPopupContentmethod (by @snkashis). #1373
Map API improvements
- Improved all view changing methods of Map(setView,panTo,setZoom,fitBounds, etc.) to accept an options object, including the ability to precisely control zoom/pan animations they cause (force disable/enable, etc.). #1617 #1616 #340 #483 #1164 #1420
- Improved MapfitBoundsmethod to acceptpadding(orpaddingTopLeftandpaddingBottomRight) options, allowing you to zoom to an area with a certain padding in pixels (usually left for controls). #859
- Improved MapinvalidateSizeto accept options object (animateandpan, the latter controls if it pans the map on size change). (by @jacobtoye and @mourner). #1766 #1767
- Added MapsetZoomAroundmethod for zooming while keeping a certain point fixed (used by scroll and double-click zooming). #1157
- Added Mapremovemethod to properly destroy the map and clean up all events, and added correspondingunloadevent (by @jfirebaugh and @mourner). #1434 #1101 #1621
- Added Maptaphandler that now contains all mobile hacks for enabling quick taps and long holds andtapToleranceoption specifying the number of pixels you can shift your finger for click to still fire.
- Added MapzoomAnimationThresholdfor setting the max zoom difference with which zoom animation can occur. #1377
- Improved MapopenPopupmethod to also accept(content, latlng)signature as a shortcut.
- Improved MapclosePopupmethod to optionally accept a popup object to close. #1641
- Improved MapstopLocatemethod to abort resetting map view if callinglocatewithsetViewoption. #747
- Improved Mapto throw exception if the specified container id is not found (by @tmcw). #1574
- Improved Maplocationfoundevent to pass all location data (heading, speed, etc.). #984 #584 #987 #1028
- Added Mapresizeevent. #1564
- Added Mapzoomlevelschangeevent that triggers when the current zoom range (min/max) changes (by @moonlite). #1376
Controls API improvements
- Added generic toolbar classes for reuse by plugin developers (used by zoom control).
- Added Mapbaselayerchange,overlayaddandoverlayremoveevents fired byControl.Layers(by @calvinmetcalf and @Xelio). #1286 #1634
- Added ControlgetContainermethod. #1409
Misc API improvements
- Made Leaflet classes compatible with CoffeeScript class inheritance syntax (by @calvinmetcalf). #1345 #1314
- Added cleanAllEventListenersmethod (aliased tooffwithout arguments) to all events-enabled objects (by @iirvine). #1599
- Added addOneTimeEventListenermethod (aliased toonce) to all events-enabled objects (by @iirvine). #473 #1596
- Added ability to pass coordinates as simple objects ({lat: 50, lon: 30}or{lat: 50, lng: 30}). #1412
- Added LatLngBoundsgetNorth,getEast,getSouth,getWestmethods (by @yohanboniface). #1318
- Added AMDsupport (Leaflet now registers itself as aleafletAMD module) (with fixes from @sheppard). #1364 #1778
- Added L.Util.trimfunction (by @kristerkari). #1607
Development workflow improvements
- Switched from Jasmine to Mocha with Expect.js (matchers) and Sinon (spies) for tests (by @tmcw & @jfirebaugh). #1479
- Added Karma integration for running tests in a headless PhantomJS instance and code coverage reporting (by @edjafarov). #1326 #1340
- Added Travis CI integration for linting and running tests for each commit and pull request automatically (by @edjafarov). #1336
- Significantly improved test coverage
- Added compatibility with lazy evaluation scripts (by @kristerkari). #1288 #1607 #1288
Bugfixes
General bugfixes
- Fixed lots of issues with extent restriction by MapmaxBounds. #1491 #1475 #1194 #900 #1333
- Fixed occasional crashes by disabling zoom animation if changing zoom level by more than 4 levels. #1377
- Fixed a bug with that caused stuttery keyboard panning in some cases (by @tmcw). #1710
- Fixed a bug that caused unwanted scrolling of the page to the top of the map on focus. #1228 #1540
- Fixed a bug where clicking on a marker with an open popup caused the popup to faded in again (by @snkashis). #506 #1386
- Fixed a bug where zoom buttons disabled state didn’t update on min/max zoom change (by @snkashis). #1372 #1328
- Fixed a bug where scrolling slightly wouldn’t always zoom out the map (by @cschwarz). #1575
- Fixed popup close button to not leave an outline after clicking on it and reopening the popup (by @dotCypress). #1537
- Fixed a bug that prevented tiles from loading during pan animation.
- Fixed a bug with contextmenuevents on popups falling through to map (by @snkashis). #1730 #1732
- Fixed 404tile loading errors when browsing the map off the world bounds.
- Fixed shifted mouse events in some cases with map inside a relatively positioned parent (by @scooterw and @jec006). #1670 #1684 #1745 #1744
- Fixed a bug where tile layer z-index order sometimes broke after view reset. #1422
Browser bugfixes
- Fixed a bug with undesirable page scrolling in Firefox 17+ when you zoom the map by scrolling (by @jfirebaugh). #1789 #1788
- Fixed a bug where mouse coordinates where shifted in Firefox if the map was inside a positioned block on a scrolled page (by @joschka). #1365 #1322
- Fixed a bug where box zoom didn’t work in some cases in Firefox 18+ (by @fabriceds). #1405
- Fixed a bug where TileLayeropacity didn’t work in IE 7-8 (by @javisantana & @danzel). #1084 #1396 #1371
- Fixed Leaflet not working correctly in PhantomJS (by @rassie). #1501
Mobile bugfixes
- Fixed a bug with layers control on WinPhone8/IE10 Touch (by @danzel). #1635 #1539
- Fixed a bug with click sometimes firing twice on WinPhone8/IE10 Touch (by @danzel). #1694
- Fixed a bug in Android where click was triggered twice on one tap (by @jerel & @mourner). #1227 #1263 #1785 #1694
- Fixed a bug in Android where click on a collapsed layers control would immediately select one of the layers (by @danzel). #1784 #1694
API bugfixes
General API bugfixes
- Fixed click mouse event inside popups not propagating outside the map (fixes issues with jQuery.live and some mobile frameworks that rely on document click listeners). #301
- Fixed a bug where event listener still fired even if it was removed on the same event in other listener (by @spamdaemon). #1661 #1654
- Fixed a bug where L.pointandL.latLngfactories weren’t passingnullandundefinedvalues through.
- Fixed DomEventremoveListenerfunction chaining (by @pagameba).
- Fixed a bug where removeEventListenerwould throw an error if no events are registered on the object (by @tjoekbezoer). #1632 #1631
- Fixed a bug where Pointequalsandcontainsmethods didn’t accept points in array form.
- Fixed a bug where LatLngBoundsextendof an undefined object would cause an error (by @korzhyk). #1688
- Fixed a bug where Control.AttributionremoveAttributionof inexistant attribution corrupted the attribution text. #1410
- Fixed a bug where setViewon an invisible map caused an error (by @jfire). #1707
- Fixed compatibility with Browserify (by @jfirebaugh). #1572
Layers API bugfixes
- Fixed a bug where default marker icon path wasn’t properly detected in some cases in IE6-7 (by @calvinmetcalf). #1294
- Fixed a bug where TileLayer.WMSparam values weren’t escaped in URLs (by @yohanboniface). #1317
- Fixed a bug where layers that belong to multiple feature groups didn’t propagate events correctly (by @danzel). #1359
- Fixed a bug where TileLayer.WMStileSizeoption was ignored (by @brianhatchl). #1080
- Fixed a bug where Polylineconstructor could overwrite the source array (by @snkashis and @danzel). #1439 #1092 #1246 #1426
- Fixed a bug where marker dragging disabling/enabling wouldn’t always work correctly (by @snkashis and @escaped). #1471 #1551
- Fixed TileLayerto prevent incorrect subdomain in case of negative tile coordinates (by @malexeev). #1532
- Fixed polygons to normalize holes (remove last point if it’s equal to the first one) (by @jfirebaugh). # #1459
- Fixed DivIconhtmloption to accept0as a value (by @stuporglue). #1633
- Fixed a bug with Canvas-based paths throwing an error on mousemovein certain conditions. #1615
- Fixed a bug where copies of the world wouldn’t load if you set TileLayerbounds(by @ansis). #1618
- Fixed a bug where TileLayerloadevent wouldn’t always fire correctly. #1565
- Fixed TileLayer.WMScompatibility with some old servers that only accepted request parameters in uppercase. #1751
- Fixed a bug with incorrect L.Icon.Default.imagePathdetection in some cases. #1657
- Fixed a bug where layer onRemovewas still called even if it was never added (by @jfirebaugh). #1729
- Fixed a bug where calling setRadiuson a Canvas-poweredCircleMarkerwould cause an infinite loop (by @snkashis). #1712 #1713 #1728
- Renamed [email protected]tomarker-icon-2x.pngto fix compatibility with Google AppEngine. #1552 #1553
- Fixed a bug where popupcloseandpopupopenevents weren’t fired for multipolygons and multipolylines (by @tmcw). #1681
Map API bugfixes
- Fixed a bug where MapfitBoundswouldn’t work correctly with large bounds (thanks to @MaZderMind). #1069
- Fixed a bug where MaphasLayerwasn’t handlingnullobjects (by @rvlasveld). #1282 #1302
- Fixed a bug where Mapmoveendfired beforedragendon drag (by @oslek). #1374
- Fixed a bug where panning with inertia produced an excessive Mapmovestartevent on inertia start (by @oslek). #1374
- Fixed a bug where Mapmoveendfired repeatedly on window resize even if the actual map size didn’t change (by @oslek). #1374
- Fixed a bug where Mapmoveendsometimes wasn’t fired after drag (particularly often when dragging with a trackpad).
- Fixed a bug that would cause an error when trying to get the state of the map in a Maploadevent listener. #962
- Added Mapautopanstartevent back (it was removed occasionally in previous version). #1375
- Fixed a bug with removing previously set MapmaxBounds(by @jec006). #1749 #1750
0.5.1 (2013-02-06)
- Fixed a regression with GeoJSONnot accepting arrays ofFeatureCollection(by @snkashis). #1299 #1298
- Fixed a regression with CirleMarkersetRadiusnot working if called before adding the layer to the map (by @danzel). #1342 #1297
0.5 (2013-01-17)
Breaking changes
Be sure to read through these changes to avoid any issues when upgrading from older versions:
- Removed default LatLngwrapping/clamping of coordinates (-180, -90to180, 90), wrapping moved to an explicit method (LatLngwrap).
- Disabled MapworldCopyJumpoption by default (jumping back to the original world copy when panning out of it). Enable it explicitly if you need it.
- Changed styles for the zoom control (you may need to update your custom styles for it).
Improvements
Usability improvements
Interaction
- Added touch zoom, pan and double tap support for IE10 touch devices and Metro apps (by @danzel and @veproza with help from @oliverheilig). #1076 #871
- Improved panning inertia to be much more natural and smooth.
- Improved dragging cursors in Chrome, Safari and Firefox (now grabbing hand cursors are used).
- Improved zoom animation curve for a better feel overall.
- Improved scroll wheel zoom to be more responsive.
- Improved panning animation performance in IE6-8.
Controls
- Improved zoom control design to look better, more neutral and in line with other controls, making it easier to customize and fit different website designs. Replaced +/- images with text.
- Improved zoom control to zoom by 3 levels if you hold shift while clicking on a button.
- Improved zoom control buttons to become visually disabled when min/max zoom is reached. #917
- Improved scale control styles.
- Improved fallback control styles for IE6-8.
Other
- Added retina support for markers (through IconiconRetinaUrlandshadowRetinaUrloptions) (by @danzel). #1048 #1174
- Added retina-sized default marker icon in addition to standard one (along with its SVG source and with some subtle design improvements) (by @danzel). #1048 #1174
- Improved vectors updating/removing performance on Canvas backend (by @danzel). #961
- Cut total images size from 10KB to 3.2KB with Yahoo Smush.it. Thanks to Peter Rounce for suggestion.
API improvements
- Replaced L.Transitionwith a much better and simplerL.PosAnimation.
- Added ClassaddInitHookmethod for adding constructor hooks to any classes (great extension point for plugin authors). #1123
- Added MapwhenReadymethod (by @jfirebaugh). #1063
- Added optional deltaargument toMapzoomInandzoomOut(1 by default).
- Added isValidmethod toLatLngBoundsandBounds(by @domoritz). #972
- Added Pointequalsmethod.
- Added BoundsgetSizemethod.
- Improved markers and vectors click event so that it propagates to map if no one is listening to it (by @danzel). #834 #1033
- Added PathunbindPopupandclosePopupmethods.
- Added Pathaddandremoveevent.
- Added MarkerriseOnHoverandriseOffsetoptions (for bringing markers to front on hover, disabled by default) (by jacobtoye). #914 #920
- Added Markermoveandremoveevents.
- Added Markercontextmenuevent. #223
- Added PopupzoomAnimationoption (useful to disable when displaying flash content inside popups #999).
- Added FeatureGrouplayeraddandlayerremoveevents (by @jacobtoye). #1122
- Added Control.Layersbaselayerchangeevent (by @jfirebaugh). #1064
- Improved Control.Layersto support HTML in layer names (by @aparshin). #1055 #1099
- Added CRS.Simpleto the list of built-in CRS and improved it to be more usable out of the box (it has different default scaling and transformation now), seedebug/map/simple-proj.htmlfor an example.
- Removed Browserua,gecko,operaproperties (no longer needed).
- Added L.extend,L.bind,L.stamp,L.setOptionsshortcuts for correspondingL.Utilmethods.
- Disabled clearing of map container contents on map initialization (as a result of fixing #278).
- Added L.Util.isArrayfunction (by @oslek). #1279
- Added mouseoverandmouseoutevents to canvas-based vector layers (by @snkashis). #1403
- Added MapeachLayerto iterate over all layers added to the map (by @jfirebaugh). #1457
- Added TileLayerboundsoption to limit tile loading to a specific region (by @adimitrov). #991
Bugfixes
General bugfixes
- Fixed broken tiles and zooming in RTL layouts (by @danzel). #1099 #1095
- Fixed a bug with pan animation where it jumped to its end position if you tried to drag the map.
- Fixed a bug where shift-clicking on a map would zoom it to the max zoom level.
- Fixed a glitch with zooming in while panning animation is running.
- Fixed a glitch with dragging the map while zoom animation is running.
- Fixed a bug where slight touchpad scrolling or one-wheel scrolling wouln’t always perform zooming. #1039
- Fixed a bug where panBywouldn’t round the offset values (so it was possible to make the map blurry with it). #1085
- Fixed a bug where you couldn’t scroll the layers control with a mouse wheel.
- Fixed a regression where WMS tiles wouldn’t wrap on date lines. #970
- Fixed a bug where mouse interaction was affected by map container border width (by @mohlendo). #1204 #1205
- Fixed a bug with weird vector zoom animation when using Canvas for rendering (by @danzel). #1187 #1188
- Fixed a bug where max bounds limitation didn’t work when navigating the map with a keyboard (by @snkashis). #989 #1221
API bugfixes
- Fixed a bug where TileLayerbringToBackdidn’t work properly in some cases (by @danzel). #963 #959
- Fixed a bug where removing a tile layer while dragging would throw an error (by @danzel). #965 #968
- Fixed a bug where middle marker wasn’t removed after deleting 2 end nodes from a polyline (by @Svad). #1022 #1023
- Fixed a bug where Maploadevent happened too late (aftermoveend, etc.) (by @jfirebaugh). #1027
- Fixed CirclegetBoundsto return correct bounds and work without adding the circle to a map. #1068
- Fixed a bug where removing Popuponviewresetthrowed an error (by fnicollet and @danzel). #1098 #1094
- Fixed a bug where TileLayer.CanvasdrawTiledidn’t receive tile zoom level in arguments.
- Fixed a bug where GeoJSONresetStylewould not fully reset a layer to its default style. #1112
- Fixed a bug that caused infinite recursion when using latLngBoundsfactory with coordinates as string values. #933
- Fixed chaining on MarkersetIcon,setZIndexOffset,updatemethods. #1176
- Fixed a bug with mouse interaction when the map container contained children with position other than absolute. #278
- Fixed a bug with fill/stroke opacity conflicts when using Canvas for rendering (by @danzel). #1186 #1889
- Fixed a bug where FeatureGroupbindPopupdidn’t take options into account.
- Fixed a bug where Canvas-based vector layers didn’t cleanup click event on removal properly (by @snkashis). #1006 #1273
- Fixed a bug where CircleMarkersetStyledidn’t takeradiusinto account (by @fdlk). #1012 #1013
- Fixed a bug where null GeoJSON geometries would throw an error instead of skipping (by @brianherbert). #1240
- Fixed a bug where Canvas-based vector layers passed incorrect layerevent property on click (by @snkashis). #1215 #1243
- Fixed a bug where TileLayer.WMSdidn’t work correctly if the base URL contained query parameters (by @snkashis). #973 #1231
- Fixed a bug where removing a polyline in editing state wouldn’t clean up the editing handles (by @mehmeta). #1233
- Fixed a bug where removing a vector layer with a bound popup wouldn’t clean up its click event properly (by @yohanboniface). #1229
- Fixed a bug where GeoJSONfeatures withGeometryCollectiondidn’t pass properties topointToLayerfunction (by @calvinmetcalf). #1097
- Fixed FeatureGroupeachLayerchaining. #1452
Browser bugfixes
- Fixed a bug with map freezing after zoom on Android 4.1. #1182
- Fixed a bug where “Not implemented” error sometimes appeared in IE6-8 (by @bryguy and @lookfirst). #892 #893
- Fixed compatibility with SmoothWheel extension for Firefox (by @waldir). #1011
- Fixed a bug with popup layout in IE6-7 (by @danzel). #1117
- Fixed a bug with incorrect box zoom opacity in IE6-7 (by @jacobtoye). #1072
- Fixed a bug with box zoom throwing a JS error in IE6-7 (by @danzel). #1071
- Fixed a bug where TileLayerbringToFront/Back()throwed an error in IE6-8. #1168
- Fixed array type checking in the code to be more consistent in a cross-frame environment (by @oslek). #1279
- Fixed a bug with -key not working in Firefox 15+ (thanks to @mattesCZ). #869
0.4.5 (2012-10-25)
- Fixed a bug with wonky zoom animation in IE10 (by @danzel). #1007
- Fixed a bug with wonky zoom animation in Chrome 23+ (by @danzel). #1060 #1056
0.4.4 (2012-08-07)
Improvements
- Improved GeoJSONsetStyleto also accept function (like the corresponding option).
- Added GeoJSONresetStyle(layer), useful for resetting hover state.
- Added featureproperty to layers created withGeoJSON(containing the GeoJSON feature data).
- Added FeatureGroupbringToFrontandbringToBackmethods (so that they would work for multipolys).
- Added optional animateargument toMapinvalidateSize(by @ajbeaven). #857
Bugfixes
- Fixed a bug where tiles sometimes disappeared on initial map load on Android 2/3 (by @danzel). #868
- Fixed a bug where map would occasionally flicker near the border on zoom or pan on Chrome.
- Fixed a bug where PathbringToFrontandbringToBackdidn’t returnthis.
- Removed zoom out on Win/Meta key binding (since it interferes with global keyboard shortcuts). #869
0.4.2 (2012-08-01)
- Fixed a bug where layers control radio buttons would not work correctly in IE7 (by @danzel). #862
- Fixed a bug where FeatureGroupremoveLayerwould unbind popups of removed layers even if the popups were not put by the group (affected Leaflet.markercluster plugin) (by @danzel). #861
0.4.1 (2012-07-31)
- Fixed a bug that caused marker shadows appear as opaque black in IE6-8. #850
- Fixed a bug with incorrect calculation of scale by the scale control. #852
- Fixed broken L.tileLayer.wms class factory (by @mattcurrie). #856
- Improved retina detection for TileLayerdetectRetinaoption (by @sxua). #854
0.4 (2012-07-30)
API simplification
Leaflet 0.4 contains several API improvements that allow simpler, jQuery-like syntax (example) while being backwards compatible with the previous approach (so you can use both styles):
- Improved most methods and options to accept LatLng,LatLngBounds,PointandBoundsvalues in an array form (e.g.map.panTo([lat, lng])will be the same asmap.panTo(new L.LatLng(lat, lng)))
- Added addTomethod to all layer classes, e.g.marker.addTo(map)is equivalent tomap.addLayer(marker)
- Added factory methods to most classes to be able to write code without newkeyword, named the same as classes but starting with a lowercase letter, e.g.L.map('map')is the same asnew L.Map('map')
Notable new features
- Added configurable panning inertia - after a quick pan, the map slows down in the same direction.
- Added keyboard navigation for panning/zooming with keyboard arrows and +/- keys (by @ericmmartinez). #663 #646
- Added smooth zoom animation of markers, vector layers, image overlays and popups (by @danzel). #740 #758
- Added Android 4+ pinch-zoom support (by @danzel). #774
- Added polyline and polygon editing. #174
- Added an unobtrusive scale control.
- Added DivIcon class that easily allows you to create lightweight div-based markers.
- Added Rectangle vector layer (by @JasonSanford). #504
Improvements
Usability improvements
- Improved zooming so that you don’t get a blank map when you zoom in or out twice quickly (by @danzel). #7 #729
- Drag-panning now works even when there are markers in the starting point (helps on maps with lots of markers). #506
- Improved panning performance even more (there are no wasted frames now).
- Improved pinch-zoom performance in mobile Chrome and Firefox.
- Improved map performance on window resize.
- Replaced box-shadow with border on controls for mobile devices to improve performance.
- Slightly improved default popup styling.
- Added TileLayerdetectRetinaoption (falseby default) that makes tiles show in a higher resolution on iOS retina displays (by @Mithgol). #586
GeoJSON API changes
GeoJSON API was improved to be simpler and more flexible (example). The changes are not backwards-compatible, so be sure to update your old code.
- Added styleoption for styling vector layers, passed either as an object or as a function (to style vector layers according to GeoJSON properties).
- Added filteroption to leave out features that don’t correspond to a certain criteria (e.g. based on properties).
- Added onEachFeatureoption to execute certain code on each feature layer based on its properties (binding popups, etc).
- Changed pointToLayerfunction signature to providegeojsonin addition tolatlngwhen creating point features for more flexibility.
Icon API changes
Icon API was improved to be more flexible, but one of the changes is backwards-incompatible: you now need to pass different icon properties (like iconUrl) inside an options object (example).
- Converted Iconproperties to options, changed constructor signature toIcon(options).
- Moved default marker icon options to L.Icon.Defaultclass (which extends fromL.Icon).
- Added IconclassNameoption to assign a custom class to an icon.
- Added IconshadowAnchoroption to set the anchor of the shadow.
- Made all Iconoptions excepticonUrloptional (if not specified, they’ll be chosen automatically or implemented using CSS). Anchor is centered by default (if size is specified), and otherwise can be set through CSS using negative margins.
Control API changes
- Added setPositionandgetPositionto all controls, as well as ability to pass certain position as an option when creating a control.
- Made controls implementation easier (now more magic happens under the hood).
- Replaced ugly control position constants (e.g. L.Control.Position.TOP_LEFT) with light strings ('topleft','bottomright', etc.)
Other breaking API changes
- Improved TileLayerconstructor to interpolate URL template values from options (removed thirdurlParamsargument).
- Changed TileLayerscheme: 'tms'option totms: true.
- Removed MaplocateAndSetViewmethod (uselocatewithsetView: trueoption)
- Changed popup minWidthandmaxWidthoptions to be applied to content element, not the whole popup.
- Moved prefixargument tooptionsinControl.Attributionconstructor.
- Renamed L.VERSIONtoL.version.
Other API improvements
- Improved onandoffmethods to also accept(eventHash[, context]), as well as multiple space-separated events (by @Guiswa). #770
- Improved offto remove all listeners of the event if no function was specified (by @Guiswa). #770 #691
- Added TileLayersetZIndexmethod for controlling the order of tile layers (thanks to @mattcurrie). #837
- Added Control.LayersautoZIndexoption (on by default) to preserve the order of tile layers when switching.
- Added TileLayerredrawmethod for re-requesting tiles (by @greeninfo). #719
- Added TileLayersetUrlmethod for dynamically changing the tile URL template.
- Added bringToFrontandbringToBackmethods toTileLayer,ImageOverlayand vector layers. #185 #505
- Added TileLayerloadingevent that fires when its tiles start to load (thanks to @lapinos03). #177
- Added TileLayer.WMSsetParamsmethod for setting WMS parameters at runtime (by @greeninfo). #719
- Added TileLayer.WMSsubdomain support ({s}in the url) (by @greeninfo). #735
- Added originalEventproperty toMouseEvent(by @k4). #521
- Added containerPointproperty toMouseEvent. #413
- Added contextmenuevent to vector layers (by @ErrorProne). #500
- Added LayerGroupeachLayermethod for iterating over its members.
- Added FeatureGroupmousemoveandcontextmenuevents (by @jacobtoye). #816
- Added chaining to DomEventmethods.
- Added onandoffaliases forDomEventaddListenerandremoveListenermethods.
- Added L_NO_TOUCHglobal variable switch (set it before Leaflet inclusion) which disables touch detection, helpful for desktop apps built using QT. #572
- Added dashArrayoption to vector layers for making dashed strokes (by jacobtoye). #821 #165
- Added CirclegetBoundsmethod. #440
- Added CirclegetLatLngandgetRadiusmethods (by @Guiswa). #655
- Added openPopupmethod to all vector layers. #246
- Added public redrawmethod to vector layers (useful if you manipulate theirLatLngpoints directly).
- Added Markeropacityoption andsetOpacitymethod.
- Added Markerupdatemethod. #392
- Improved MarkeropenPopupnot to raise an error if it doesn’t have a popup. #507
- Added ImageOverlayopacityoption andsetOpacitymethod. #438
- Added PopupmaxHeightoption that makes content inside the popup scrolled if it doesn’t fit the specified max height.
- Added PopupopenOn(map)method (similar toMapopenPopup).
- Added MapgetContainermethod (by @Guiswa). #654
- Added MapcontainerPointToLatLngandlatLngToContainerPointmethods. #474
- Added MapaddHandlermethod.
- Added Mapmouseupandautopanstartevents.
- Added LatLngBoundspadmethod that returns bounds extended by a percentage (by @jacobtoye). #492
- Moved dragging cursor styles from JS code to CSS.
Bug fixes
General bugfixes
- Fixed a bug where the map was zooming incorrectly inside a position: fixedcontainer (by @chx007). #602
- Fixed a bug where scaled tiles weren’t cleared up after zoom in some cases (by @cfis) #683
- Fixed a bug where map wouldn’t drag over a polygon with a mousedownlistener. #834
API bugfixes
- Fixed a regression where removeLayer would not remove corresponding attribution. #488
- Fixed a bug where popup close button wouldn’t work on manually added popups. #423
- Fixed a bug where marker click event would stop working if you dragged it and then disabled dragging. #434
- Fixed a bug where TileLayersetOpacitywouldn’t work when setting it back to 1.
- Fixed a bug where vector layer setStyle({stroke: false})wouldn’t remove stroke and the same for fill. #441
- Fixed a bug where MarkerbindPopupmethod wouldn’t takeoffsetoption into account.
- Fixed a bug where TileLayerloadevent wasn’t fired if some tile didn’t load (by @lapinos03 and @cfis) #682
- Fixed error when removing GeoJSONlayer. #685
- Fixed error when calling GeoJSONclearLayer(by @runderwood). #617
- Fixed a bug where ControlsetPositionwasn’t always working correctly (by @ericmmartinez). #657
- Fixed a bug with Util.bindsometimes losing arguments (by @johtso). #588
- Fixed a bug where dragevent was sometimes fired afterdragend. #555
- Fixed a bug where TileLayerloadevent was firing only once (by @lapinos03 and shintonik). #742 #177
- Fixed a bug where FeatureGrouppopup events where not cleaned up after removing a layer from it (by @danzel). #775
- Fixed a bug where DomUtil.removeClassdidn’t remove trailing spaces (by @jieter). #784
- Fixed a bug where marker popup didn’t take popup offset into account.
- Fixed a bug that led to an error when polyline was removed inside a moveendlistener.
- Fixed a bug where LayerGroupaddLayerwouldn’t check if a layer has already been added (by @danzel). 798
Browser bugfixes
- Fixed broken zooming on IE10 beta (by @danzel). #650 #751
- Fixed a bug that broke Leaflet for websites that had XHTML content-type header set (by lars-sh). #801
- Fixed a bug that caused popups to be empty in IE when passing a DOM node as the content (by @nrenner). #472
- Fixed inability to use scrolled content inside popup due to mouse wheel propagation.
- Fixed a bug that caused jumping/stuttering of panning animation in some cases.
- Fixed a bug where popup size was calculated incorrectly in IE.
- Fixed a bug where cursor would flicker when dragging a marker.
- Fixed a bug where clickable paths on IE9 didn’t have a hand cursor (by naehrstoff). #671
- Fixed a bug in IE with disappearing icons when changing opacity (by @tagliala and DamonOehlman). #667 #600
- Fixed a bug with setting opacity on IE10 (by @danzel). 796
- Fixed a bug where Control.Layersdidn’t work on IE7. #652
- Fixed a bug that could cause false mousemoveevents on click in Chrome (by @stsydow). #757
- Fixed a bug in IE6-8 where adding fill or stroke on vector layers after initialization with setStylewould break the map. #641
- Fixed a bug with setOpacity in IE where it would not work correctly if used more than once on the same element (by @ajbeaven). #827
- Fixed a bug in Chrome where transparent control corners sometimes couldn’t be clicked through (by @danzel). #836 #575
Mobile browser bugfixes
- Fixed a bug that sometimes caused map to disappear completely after zoom on iOS (by @fr1n63). #580 #777
- Fixed a bug that often caused vector layers to flicker on drag end on iOS (by @krawaller). #18
- Fixed a bug with false map click events on pinch-zoom and zoom/layers controls click. #485
- Fixed a bug where touching the map with two or more fingers simultaneously would raise an error.
- Fixed a bug where zoom control wasn’t always visible on Android 3. #335
- Fixed a bug where opening the layers control would propagate a click to the map (by @jacobtoye). #638
- Fixed a bug where ImageOverlaywouldn’t stretch properly on zoom on Android 2. #651
- Fixed a bug where clearLayersfor vector layers on a Canvas backend (e.g. on Android 2) would take unreasonable amount of time. #785
- Fixed a bug where setLatLngsand similar methods on vector layers on a Canvas backend would not update the layers immediately. #732
0.3.1 (2012-02-14)
- Fixed a regression where default marker icons wouldn’t work if Leaflet include url contained a query string.
- Fixed a regression where tiles sometimes flickered with black on panning in iOS.
0.3 (2012-02-13)
Major features
- Added Canvas backend for vector layers (polylines, polygons, circles). This enables vector support on Android < 3, and it can also be optionally preferred over SVG for a performance gain in some cases. Thanks to @florianf for a big part of this work.
- Added layers control (Control.Layers) for convenient layer switching.
- Added ability to set max bounds within which users can pan/zoom. #93
Improvements
Usability improvements
- Map now preserves its center after resize.
- When panning to another copy of the world (that’s infinite horizontally), map overlays now jump to corresponding positions. #273
- Limited maximum zoom change on a single mouse wheel movement (so you won’t zoom across the whole zoom range in one scroll). #149
- Significantly improved line simplification performance (noticeable when rendering polylines/polygons with tens of thousands of points)
- Improved circles performance by not drawing them if they’re off the clip region.
- Improved stability of zoom animation (less flickering of tiles).
API improvements
- Added ability to add a tile layer below all others (map.addLayer(layer, true)) (useful for switching base tile layers).
- Added Mapzoomstartevent (thanks to @Fabiz). #377
- Improved Maplocatemethod, added ability to watch location continuously and more options. #212
- Added second argument insidetoMapgetBoundsZoommethod that allows you to get appropriate zoom for the view to fit inside the given bounds.
- Added hasLayermethod toMap.
- Added MarkerzIndexOffsetoption to be able to set certain markers below/above others. #65
- Added urlParamsthird optional argument toTileLayerconstructor for convenience: an object with properties that will be evaluated in the URL template.
- Added TileLayercontinuousWorldoption to disable tile coordinates checking/wrapping.
- Added TileLayertileunloadevent fired when tile gets removed after panning (by @CodeJosch). #256
- Added TileLayerzoomOffsetoption useful for non-256px tiles (by @msaspence).
- Added TileLayerzoomReverseoption to reverse zoom numbering (by @Majiir). #406
- Added TileLayer.Canvasredrawmethod (by @mortenbekditlevsen). #459
- Added PolylineclosestLayerPointmethod that’s can be useful for interaction features (by @anru). #186
- Added setLatLngsmethod toMultiPolylineandMultiPolygon(by @anru). #194
- Added getBoundsmethod toPolylineandPolygon(by @JasonSanford). #253
- Added getBoundsmethod toFeatureGroup(by @JasonSanford). #557
- Added FeatureGroupsetStylemethod (also inherited byMultiPolylineandMultiPolygon). #353
- Added FeatureGroupinvokemethod to call a particular method on all layers of the group with the given arguments.
- Added ImageOverlayloadevent. #213
- Added minWidthoption toPopup(by @marphi). #214
- Improved LatLngconstructor to be more tolerant (and throw descriptive error if latitude or longitude can’t be interpreted as a number). #136
- Added LatLngdistanceTomethod (great circle distance) (by @mortenbekditlevsen). #462
- Added LatLngBoundstoBBoxStringmethod for convenience (by @JasonSanford). #263
- Added LatLngBoundsintersects(otherBounds)method (thanks to @pagameba). #350
- Made LatLngBoundsextendmethod to accept otherLatLngBoundsin addition toLatLng(by @JasonSanford). #553
- Added Boundsintersects(otherBounds)method. #461
- Added L.Util.templatemethod for simple string template evaluation.
- Added DomUtil.removeClassmethod (by @anru).
- Improved browser-specific code to rely more on feature detection rather than user agent string.
- Improved superclass access mechanism to work with inheritance chains of 3 or more classes; now you should use Klass.superclassinstead ofthis.superclass(by @anru). #179
- Added Mapboxzoomstartandboxzoomendevents (by @zedd45). #554
- Added Popupcontentupdateevent (by @mehmeta). #548
Breaking API changes
- shiftDragZoommap option/property renamed to- boxZoom.
- Removed mouseEventToLatLngmethod (bringed back in 0.4).
Development workflow improvements
- Build system completely overhauled to be based on Node.js, Jake, JSHint and UglifyJS.
- All code is now linted for errors and conformity with a strict code style (with JSHint), and wont build unless the check passes.
Bugfixes
General bugfixes
- Fixed a bug where Circlewas rendered with incorrect radius (didn’t take projection exagerration into account). #331
- Fixed a bug where MapgetBoundswould work incorrectly on a date line cross. #295
- Fixed a bug where polygons and polylines sometimes rendered incorrectly on some zoom levels. #381
- Fixed a bug where fast mouse wheel zoom worked incorrectly when approaching min/max zoom values.
- Fixed a bug where GeoJSONpointToLayeroption wouldn’t work in aGeometryCollection. #391
- Fixed a bug with incorrect rendering of GeoJSON on a date line cross. #354
- Fixed a bug where map panning would stuck forever after releasing the mouse over an iframe or a flash object (thanks to @sten82). #297 #64
- Fixed a bug where mouse wheel zoom worked incorrectly if map is inside scrolled container (partially by @chrillo). #206
- Fixed a bug where it was possible to add the same listener twice. #281
- Fixed a bug where Circlewas rendered with incorrect radius (didn’t take projection exaggeration into account). #331
- Fixed a bug where MarkersetIconwas not working properly (by @marphi). #218 #311
- Fixed a bug where MarkersetLatLngwas not working if it’s set before adding the marker to a map. #222
- Fixed a bug where marker popup would not move on MarkersetLatLng(by @tjarratt). #272
- Fixed a bug where static properties of a child class would not override the parent ones.
- Fixed broken popup closePopupoption (by @jgerigmeyer).
- Fixed a bug that caused en error when dragging marker with icon without shadow (by @anru). #178
- Fixed a typo in Boundscontainsmethod (by @anru). #180
- Fixed a bug where creating an empty Polygonwithnew L.Polygon()would raise an error.
- Fixed a bug where drag event fired before the actual movement of layer (by @anru). #197
- Fixed a bug where map click caused an error if dragging is initially disabled. #196
- Fixed a bug where map movestartevent would fire after zoom animation.
- Fixed a bug where attribution prefix would not update on setPrefix. #195
- Fixed a bug where TileLayerloadevent wouldn’t fire in some edge cases (by @dravnic).
- Fixed a bug related to clearing background tiles after zooming (by @neno-giscloud & @dravnic).
- Fixed a bug that sometimes caused map flickering after zoom animation.
- Fixed a bug related to cleaning up after removing tile layers (by @dravnic). #276
- Fixed a bug that made selecting text in the attribution control impossible. #279
- Fixed a bug when initializing a map in a non-empty div. #278
- Fixed a bug where movestartdidn’t fire on panning animation.
- Fixed a bug in Elliptical Mercator formula that affeted EPSG:3395CRS (by @Savvkin). #358
Browser bugfixes
- Fixed occasional crashes on Mac Safari (thanks to @lapinos03). #191
- Fixed a bug where resizing the map would sometimes make it blurry on WebKit (by @mortenbekditlevsen). #453
- Fixed a bug that raised error in IE6-8 when clicking on popup close button. #235
- Fixed a bug with Safari not redrawing UI immediately after closing a popup. #296
- Fixed a bug that caused performance drop and high CPU usage when calling setVieworpanToto the current center. #231
- Fixed a bug that caused map overlays to appear blurry in some cases under WebKit browsers.
- Fixed a bug that was causing errors in some Webkit/Linux builds (requestAnimationFrame-related), thanks to Chris Martens.
Mobile browser bugfixes
- Fixed a bug that caused an error when clicking vector layers under iOS. #204
- Fixed crash on Android 3+ when panning or zooming (by @florian). #137
- Fixed a bug on Android 2/3 that sometimes caused the map to disappear after zooming. #69
- Fixed a bug on Android 3 that caused tiles to shift position on a big map.
- Fixed a bug that caused the map to pan when touch-panning inside a popup. #452
- Fixed a bug that caused click delays on zoom control.
0.2.1 (2011-06-18)
- Fixed regression that caused error in TileLayer.Canvas.
0.2 (2011-06-17)
Major features
- Added WMS support (TileLayer.WMSlayer).
- Added different projections support, having EPSG:3857,EPSG:4326andEPSG:3395out of the box (throughcrsoption inMap). Thanks to @Miroff & @Komzpa for great advice and explanation regarding this.
- Added GeoJSON layer support.
Improvements
Usability improvements
- Improved panning performance in Chrome and FF considerably with the help of requestAnimationFrame. #130
- Improved click responsiveness in mobile WebKit (now it happens without delay). #26
- Added tap tolerance (so click happens even if you moved your finger slighly when tapping).
- Improved geolocation error handling: better error messages, explicit timeout, set world view on locateAndSetView failure. #61
API improvements
- Added MultiPolyline and MultiPolygon layers. #77
- Added LayerGroup and FeatureGroup layers for grouping other layers.
- Added TileLayer.Canvas for easy creation of canvas-based tile layers.
- Changed Circleto be zoom-dependent (with radius in meters); circle of a permanent size is now calledCircleMarker.
- Added mouseoverandmouseoutevents to map, markers and paths; added mapmousemoveevent.
- Added setLatLngs,spliceLatLngs,addLatLng,getLatLngsmethods to polylines and polygons.
- Added setLatLngandsetRadiusmethods toCircleandCircleMarker.
- Improved LatLngBounds containsmethod to acceptLatLngin addition toLatLngBounds, the same forBounds containsandPoint
- Improved LatLngBounds&Boundsto allow their instantiation without arguments (by @snc).
- Added TMS tile numbering support through TileLayerscheme: 'tms'option (by @tmcw).
- Added TileLayernoWrapoption to disable wrappingxtile coordinate (by @jasondavies).
- Added opacityoption andsetOpacitymethod toTileLayer.
- Added setLatLngandsetIconmethods toMarker.
- Added titleoption toMarker.
- Added maxZoomargument tomap.locateAndSetViewmethod.
- Added ability to pass Geolocation options to map locateandlocateAndSetViewmethods (by @JasonSanford).
- Improved Popupto accept HTML elements in addition to strings as its content.
Development workflow improvements
- Added Makefilefor buildingleaflet.json non-Windows machines (by @tmcw).
- Improved debug/leaflet-include.jsscript to allow using it outside ofdebugfolder (by @antonj).
- Improved Ldefinition to be compatible with CommonJS. #122
Bug fixes
General bugfixes
- Fixed a bug where zooming is broken if the map contains a polygon and you zoom to an area where it’s not visible. #47
- Fixed a bug where closed polylines would not appear on the map.
- Fixed a bug where marker that was added, removed and then added again would not appear on the map. #66
- Fixed a bug where tile layer that was added, removed and then added again would not appear on the map.
- Fixed a bug where some tiles would not load when panning across the date line. #97
- Fixed a bug where map div with position: absoluteis reset torelative. #100
- Fixed a bug that caused an error when trying to add a marker without shadow in its icon.
- Fixed a bug where popup content would not update on setContentcall. #94
- Fixed a bug where double click zoom wouldn’t work if popup is opened on map click
- Fixed a bug with click propagation on popup close button. #99
- Fixed inability to remove ImageOverlay layer.
Browser bugfixes
- Fixed a bug where paths would not appear in IE8.
- Fixed a bug where there were occasional slowdowns before zoom animation in WebKit. #123
- Fixed incorrect zoom animation & popup styling in Opera 11.11.
- Fixed popup fade animation in Firefox and Opera.
- Fixed a bug where map isn’t displayed in Firefox when there’s an img { max-width: 100% }rule.
Mobile browsers bugfixes
- Fixed a bug that prevented panning on some Android 2.1 (and possibly older) devices. #84
- Disabled zoom animation on Android by default because it’s buggy on some devices (will be enabled back when it’s stable enough). #32
- Fixed a bug where map would occasionally break while multi-touch-zooming on iOS. #32
- Fixed a bug that prevented panning/clicking on Android 3 tablets. #121
- Fixed a bug that prevented panning/clicking on Opera Mobile. #138
- Fixed potentional memory leak on WebKit when removing tiles, thanks to @Scalar4eg. #107
0.1 (2011-05-13)
Initial Leaflet release.