diff --git a/reference.html b/reference.html index 32996d21..f715c158 100644 --- a/reference.html +++ b/reference.html @@ -96,7 +96,7 @@ bodyclass: api-page
@@ -123,7 +123,7 @@ bodyclass: api-pageThis reference reflects Leaflet 0.4.5. You can find docs for the in-progress master version in reference.html
of gh-pages-master branch.
This reference reflects Leaflet 0.5. You can find docs for the in-progress master version in reference.html
of gh-pages-master branch.
worldCopyJump
Boolean
true
false
closePopupOnClick
zoomIn()
zoomIn( <Number> delta? )
this
delta
(1
by default).zoomOut()
zoomOut( <Number> delta? )
this
delta
(1
by default).fitBounds(
@@ -891,6 +891,13 @@ var map = L.map('map', {
MapPanes
Returns an object with different map panes (to render overlays in).
whenReady(
+ <Function> fn ,
+ <Object> context? )
this
1.0
riseOnHover
Boolean
false
true
, the marker will get on top of others when you hover the mouse over it.riseOffset
Number
250
riseOnHover
feature.MouseEvent
contextmenu
MouseEvent
+ dragstart
Event
@@ -1382,6 +1406,12 @@ var map = L.map('map', {
zoomAnimation
Boolean
true
MouseEvent
add
Event
+ remove
Event
@@ -2071,6 +2106,12 @@ L.imageOverlay(imageUrl, imageBounds).addTo(map);
this
closePopup()
this
setStyle(
<Path options> object )
@@ -2712,6 +2753,16 @@ map.fitBounds(bounds);
MouseEvent
layeradd
LayerEvent
+ layerremove
LayerEvent
+ L.LatLng(
<Number> latitude ,
- <Number> longitude ,
- <Boolean> noWrap? )
+ <Number> longitude )
L.latLng([…])
-180
and 180
and clamps longitude between -90
and 90
by default — you can disable this with the noWrap
argument.String
wrap(
+ <Number> left ,
+ <Number> right )
+
LatLng
LatLng
object with the longitude wrapped around left
and right
boundaries (-180
to 180
by default).Point
equals(
+ <Point> otherPoint )
+
Boolean
true
if the given point has the same coordinates.toString()
String
true
if the rectangle intersects the given bounds.isValid()
-
isValid()
Boolean
true
if the bounds are properly initialized.getSize()
Point
The layer names can contain HTML, which allows you to add additional styling to the items:
+ +{"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>": myLayer}
+
+
+You can subscribe to the following events using these methods.
+ +Event | +Data | +Description | +
---|---|---|
baselayerchange |
+ LayerEvent
+ | Fired when the base layer is changed through the control. | +
If you're a plugin developer, you often need to add additional initialization code to existing classes (e.g. editing hooks for L.Polyline
). Leaflet comes with a way to do it easily using the addInitHook
method:
MyClass.addInitHook(function () {
+ // ... do something in constructor additionally
+ // e.g. add event listeners, set custom properties etc.
+});
+
+You can also use the following shortcut when you just need to make one additional method call:
+ +MyClass.addInitHook('methodName', arg1, arg2, …);
+
Boolean
true
for Internet Explorer 6.ie7
Boolean
true
for Internet Explorer 6.webkit
Boolean
Boolean
true
for webkit-based browsers that support CSS 3D transformations.android
Boolean
true
for Android mobile browser.android23
Boolean
true
for old Android stock browsers (2 and 3).mobile
Boolean
Boolean
true
for all browsers on touch devices.msTouch
Boolean
true
for browsers with Microsoft touch model (e.g. IE10).retina
Boolean
Object
src
object (or multiple objects) into dest
object and returns the latter.src
object (or multiple objects) into dest
object and returns the latter. Has an L.extend
shortcut.bind(
@@ -4493,12 +4614,12 @@ L.map('map');
Function
fn
with the given scope obj
(so that this
keyword refers to obj
inside the function code).fn
with the given scope obj
(so that this
keyword refers to obj
inside the function code). Has an L.bind
shortcut.stamp( <Object> obj )
String
L.stamp
shortcut.new L.PosAnimation()
- Option | -Type | -Default | +Method | +Returns | Description | |
---|---|---|---|---|---|---|
duration |
- Number |
- 0.5 |
- Duration of the animation in seconds. | -|||
easing |
- String |
- 'ease' |
- One of the timing functions for the animation. | -|||
fps |
- Number |
- 50 |
- Frames per second for the timer fallback (IE6-9). | -|||
fakeStepInterval |
- Number |
- 100 |
- How often to fire the step event during transition with a timer (as native transitions don't support such events). |
+ run(
+ |
+
+ this |
+ Run an animation of a given element to a new position, optionally setting duration in seconds (0.25 by default) and easing linearity factor (3rd argument of the cubic bezier curve, 0.5 by default) |
Method | -Returns | -Description | -
---|---|---|
run(
- |
-
- this |
- Run the animation with the given set of properties and their end values. | -
An object literal of the following form:
- -{
- '<style-property-1>': '<value-1>',
- '<style-property-2>': '<value-2>'
- // ...
-}
-
-
L.CRS.Simple
x
and y
directly. May be used for maps of flat surfaces (e.g. game maps).x
and y
directly. May be used for maps of flat surfaces (e.g. game maps). Note that the y
axis should still be inverted (going from bottom to top).L_NO_TOUCH
L_DISABLE_3D
A constant that represents the Leaflet version in use.
-
L.version // returns "0.4" (or whatever version is currently in use)
+L.version // returns "0.5" (or whatever version is currently in use)