update changelog about API simplification
This commit is contained in:
parent
16cdb668b2
commit
00cb32c40c
@ -7,6 +7,14 @@ Leaflet Changelog
|
|||||||
|
|
||||||
An in-progress version being developed on the master branch.
|
An in-progress version being developed on the master branch.
|
||||||
|
|
||||||
|
### API simplification
|
||||||
|
|
||||||
|
Leaflet 0.4 contains several API improvements that allow simpler, jQuery-like syntax while being backwards compatible with the previous approach (so you can use both styles):
|
||||||
|
|
||||||
|
* Improved most methods and options to accept `LatLng`, `LatLngBounds`, `Point` and `Bounds` values in an array form (e.g. `map.panTo([lat, lng])` will be the same as `map.panTo(new L.LatLng(lat, lng))`)
|
||||||
|
* Added `addTo` method to all layer classes, e.g. `marker.addTo(map)` is equivalent to `map.addLayer(marker)`
|
||||||
|
* Added factory methods to most classes to be able to write code without `new` keyword, named the same as classes but starting with a lowercase letter, e.g. `L.map('map')` is the same as `new L.Map('map')`
|
||||||
|
|
||||||
### Notable new features
|
### Notable new features
|
||||||
|
|
||||||
* Added configurable **panning inertia** - after a quick pan, the map slows down in the same direction.
|
* Added configurable **panning inertia** - after a quick pan, the map slows down in the same direction.
|
||||||
|
Loading…
Reference in New Issue
Block a user