19 KiB
19 KiB
Leaflet Changelog
(all changes without author notice are by @mourner)
0.4 (master)
Improvements
API Improvements
- Added
Circle
getBounds
method. #440 - Added
setPosition
andgetPosition
to 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).
- Added
Map
containerPointToLatLng
andlatLngToContainerPoint
methods. #474 - Added
containerPoint
property toMouseEvent
. - Added chaining to
DomEvent
methods. - Fixed a bug where popup size was calculated incorrectly in IE.
Breaking API changes
- Improved
TileLayer
constructor to interpolate URL template values from options (removed thirdurlParams
argument). - Replaced ugly control position constants (e.g. L.Control.Position.TOP_LEFT) with light strings ('topleft', 'bottomright', etc.)
- Removed
Map
locateAndSetView
method (uselocate
withsetView: true
option)
Bug fixes
- Fixed a bug where
TileLayer.WMS
wouldn't takeinsertAtTheBottom
option into account (by @bmcbride). #478
0.3.2 RC
- Fixed a regression where removeLayer would not remove corresponding attribution. #488
0.3.1 (February 14, 2012)
- 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 (February 13, 2012)
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
Map
zoomstart
event (thanks to @Fabiz). #377 - Improved
Map
locate
method, added ability to watch location continuously and more options. #212 - Added second argument
inside
toMap
getBoundsZoom
method that allows you to get appropriate zoom for the view to fit inside the given bounds. - Added
hasLayer
method toMap
. - Added
Marker
zIndexOffset
option to be able to set certain markers below/above others. #65 - Added
urlParams
third optional argument toTileLayer
constructor for convenience: an object with properties that will be evaluated in the URL template. - Added
TileLayer
continuousWorld
option to disable tile coordinates checking/wrapping. - Added
TileLayer
tileunload
event fired when tile gets removed after panning (by @CodeJosch). #256 - Added
TileLayer
zoomOffset
option useful for non-256px tiles (by @msaspence). - Added
TileLayer
zoomReverse
option to reverse zoom numbering (by @Majiir). #406 - Added
TileLayer.Canvas
redraw
method (by @mortenbekditlevsen). #459 - Added
Polyline
closestLayerPoint
method that's can be useful for interaction features (by @anru). #186 - Added
setLatLngs
method toMultiPolyline
andMultiPolygon
(by @anru). #194 - Added
getBounds
method toPolyline
andPolygon
(by @JasonSanford). #253 - Added
FeatureGroup
setStyle
method (also inherited byMultiPolyline
andMultiPolygon
). #353 - Added
FeatureGroup
invoke
method to call a particular method on all layers of the group with the given arguments. - Added
ImageOverlay
load
event. #213 - Added
minWidth
option toPopup
(by @marphi). #214 - Improved
LatLng
constructor to be more tolerant (and throw descriptive error if latitude or longitude can't be interpreted as a number). #136 - Added
LatLng
distanceTo
method (great circle distance) (by @mortenbekditlevsen). #462 - Added
LatLngBounds
toBBoxString
method for convenience (by @JasonSanford). #263 - Added
LatLngBounds
intersects(otherBounds)
method (thanks to @pagameba). #350 - Added
Bounds
intersects(otherBounds)
method. #461 - Added
L.Util.template
method for simple string template evaluation. - Added
DomUtil.removeClass
method (by @anru). - Added ability to pass empty imageUrl to icons for creating transparent clickable regions (by @mortenbekditlevsen). #460
- 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.superclass
instead ofthis.superclass
(by @anru). #179
Breaking API changes
shiftDragZoom
map option/property renamed toboxZoom
.
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
Circle
was rendered with incorrect radius (didn't take projection exagerration into account). #331 - Fixed a bug where
Map
getBounds
would 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
GeoJSON
pointToLayer
option 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
Circle
was rendered with incorrect radius (didn't take projection exaggeration into account). #331 - Fixed a bug where
Marker
setIcon
was not working properly (by @marphi). #218 #311 - Fixed a bug where
Marker
setLatLng
was not working if it's set before adding the marker to a map. #222 - Fixed a bug where marker popup would not move on
Marker
setLatLng
(by @tjarratt). #272 - Fixed a bug where static properties of a child class would not override the parent ones.
- Fixed broken popup
closePopup
option (by @jgerigmeyer). - Fixed a bug that caused en error when dragging marker with icon without shadow (by @anru). #178
- Fixed a typo in
Bounds
contains
method (by @anru). #180 - Fixed a bug where creating an empty
Polygon
withnew 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
movestart
event would fire after zoom animation. - Fixed a bug where attribution prefix would not update on
setPrefix
. #195 - Fixed a bug where
TileLayer
load
event 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
movestart
didn't fire on panning animation. - Fixed a bug in Elliptical Mercator formula that affeted
EPSG:3395
CRS (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
setView
orpanTo
to 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.WMS
layer). - Added different projections support, having
EPSG:3857
,EPSG:4326
andEPSG:3395
out of the box (throughcrs
option 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
Circle
to be zoom-dependent (with radius in meters); circle of a permanent size is now calledCircleMarker
. - Added
mouseover
andmouseout
events to map, markers and paths; added mapmousemove
event. - Added
setLatLngs
,spliceLatLngs
,addLatLng
,getLatLngs
methods to polylines and polygons. - Added
setLatLng
andsetRadius
methods toCircle
andCircleMarker
. - Improved
LatLngBounds contains
method to acceptLatLng
in addition toLatLngBounds
, the same forBounds contains
andPoint
- Improved
LatLngBounds
&Bounds
to allow their instantiation without arguments (by @snc). - Added TMS tile numbering support through
TileLayer
scheme: 'tms'
option (by @tmcw). - Added
TileLayer
noWrap
option to disable wrappingx
tile coordinate (by @jasondavies). - Added
opacity
option andsetOpacity
method toTileLayer
. - Added
setLatLng
andsetIcon
methods toMarker
. - Added
title
option toMarker
. - Added
maxZoom
argument tomap.locateAndSetView
method. - Added ability to pass Geolocation options to map
locate
andlocateAndSetView
methods (by @JasonSanford). - Improved
Popup
to accept HTML elements in addition to strings as its content.
Development workflow improvements
- Added
Makefile
for buildingleaflet.js
on non-Windows machines (by @tmcw). - Improved
debug/leaflet-include.js
script to allow using it outside ofdebug
folder (by @antonj). - Improved
L
definition 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: absolute
is 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
setContent
call. #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.