diff --git a/reference.html b/reference.html index 2f7c14ac..162f3974 100644 --- a/reference.html +++ b/reference.html @@ -175,37 +175,37 @@ var map = L.map('map', {
center
LatLng
null
null
zoom
Number
null
null
layers
ILayer[]
null
null
minZoom
Number
null
null
minZoom
set on map layers.maxZoom
Number
null
null
maxZoom
set on map layers.maxBounds
LatLngBounds
null
null
dragging
Boolean
true
true
touchZoom
Boolean
true
true
scrollWheelZoom
Boolean
true
'center'
, it will zoom to the center of the view regardless of where the mouse was.true
'center'
, it will zoom to the center of the view regardless of where the mouse was.doubleClickZoom
Boolean
true
'center'
, double-click zoom will zoom to the center of the view regardless of where the mouse was.true
'center'
, double-click zoom will zoom to the center of the view regardless of where the mouse was.boxZoom
Boolean
true
true
tap
Boolean
true
true
contextmenu
events).tapTolerance
Number
15
15
trackResize
Boolean
true
true
worldCopyJump
Boolean
false
false
closePopupOnClick
Boolean
true
false
if you don't want popups to close when user clicks the map.true
false
if you don't want popups to close when user clicks the map.bounceAtZoomLimits
Boolean
true
false
if you don't want the map to zoom beyond min/max zoom and then bounce back when pinch-zooming.true
false
if you don't want the map to zoom beyond min/max zoom and then bounce back when pinch-zooming.keyboard
Boolean
true
true
+
/-
keys.keyboardPanOffset
Number
80
80
keyboardZoomOffset
Number
1
1
+
or -
key.inertia
Boolean
true
true
inertiaDeceleration
Number
3000
3000
inertiaMaxSpeed
Number
1500
1500
inertiaThreshold
Number
depends
32
for touch devices and 14
for the rest by default.32
for touch devices and 14
for the rest by default.zoomControl
Boolean
true
true
attributionControl
Boolean
true
true
zoomAnimationThreshold
Number
this
this
this
this
this
delta
(1
by default).this
delta
(1
by default).zoomOut(
<Number> delta? ,
<zoom options> options? )
this
delta
(1
by default).this
delta
(1
by default).setZoomAround(
@@ -646,7 +646,7 @@ var map = L.map('map', {
<Number> zoom ,
<zoom options> options? )
this
this
this
this
fitWorld(
<fitBounds options> options? )
this
this
this
this
this
this
this
this
invalidateSize(
<Boolean> animate )
this
this
invalidateSize(
<zoom/pan options> options )
this
options.pan
is false
, panning will not occur. If options.debounceMoveend
is true
, it will delay moveend
event so that it doesn't happen often even if the method is called many times in a row.this
options.pan
is false
, panning will not occur. If options.debounceMoveend
is true
, it will delay moveend
event so that it doesn't happen often even if the method is called many times in a row.setMaxBounds(
<LatLngBounds> bounds
this
this
locate(
<Locate options> options? )
this
this
locationfound
event with location data on success or a locationerror
event on failure, and optionally sets the map view to the user's location with respect to detection accuracy (or to the world view if geolocation failed). See Locate options for more details.stopLocate()
this
this
map.locate({watch: true})
and aborts resetting the map view if map.locate
was called with {setView: true}
.remove()
this
this
Number
inside
(optional) is set to true
, the method instead returns the minimum zoom level on which the map view fits into the given bounds in its entirety.inside
(optional) is set to true
, the method instead returns the minimum zoom level on which the map view fits into the given bounds in its entirety.getSize()
this
this
this
this
Boolean
true
if the given layer is currently added to the map.true
if the given layer is currently added to the map.eachLayer(
<Function> fn ,
<Object> context? )
this
this
map.eachLayer(function (layer) {
layer.bindPopup('Hello');
@@ -839,7 +839,7 @@ var map = L.map('map', {
<Popup> popup )
this
this
this
this
closePopup(
<Popup> popup? )
this
this
this
this
this
this
watch
Boolean
false
true
, starts continous watching of location changes (instead of detecting it once) using W3C watchPosition
method. You can later stop watching using map.stopLocate()
method.false
true
, starts continous watching of location changes (instead of detecting it once) using W3C watchPosition
method. You can later stop watching using map.stopLocate()
method.setView
Boolean
false
true
, automatically sets the map view to the user location with respect to detection accuracy, or to world view if geolocation failed.false
true
, automatically sets the map view to the user location with respect to detection accuracy, or to world view if geolocation failed.maxZoom
Number
Infinity
Infinity
timeout
Number
10000
10000
locationerror
event.maximumAge
Number
0
0
locate
will return a cached location.enableHighAccuracy
Boolean
false
false
reset
Boolean
false
true
, the map view will be completely reset (without any animations).false
true
, the map view will be completely reset (without any animations).pan
animate
Boolean
-
-
animate
to both zoom and pan options (see below).animate
Boolean
-
true
, panning will always be animated if possible. If false
, it will not animate panning, either resetting the map view if panning more than a screen away, or just setting a new offset for the map pane (except for `panBy` which always does the latter).true
, panning will always be animated if possible. If false
, it will not animate panning, either resetting the map view if panning more than a screen away, or just setting a new offset for the map pane (except for `panBy` which always does the latter).duration
Number
0.25
0.25
easeLinearity
Number
0.25
0.25
noMoveStart
Boolean
false
true
, panning won't fire movestart
event on start (used internally for panning inertia).false
true
, panning won't fire movestart
event on start (used internally for panning inertia).animate
Boolean
-
true
, the map will attempt animating zoom disregarding where zoom origin is. Setting false
will make it always reset the view completely without animation.true
, the map will attempt animating zoom disregarding where zoom origin is. Setting false
will make it always reset the view completely without animation.paddingTopLeft
Point
[0, 0]
+ [0, 0]
Sets the amount of padding in the top left corner of a map container that shouldn't be accounted for when setting the view to fit bounds. Useful if you have some control overlays on the map like a sidebar and you don't want them to obscure objects you're zooming to.
paddingBottomRight
Point
[0, 0]
+ [0, 0]
The same for bottom right corner of the map.
padding
Point
[0, 0]
+ [0, 0]
Equivalent of setting both top left and bottom right padding to the same value.
maxZoom
Number
null
null
clickable
Boolean
true
false
, the marker will not emit mouse events and will act as a part of the underlying map.true
false
, the marker will not emit mouse events and will act as a part of the underlying map.draggable
Boolean
false
false
keyboard
Boolean
true
true
title
String
''
''
alt
String
''
''
alt
attribute of the icon image (useful for accessibility).zIndexOffset
Number
0
0
1000
(or high negative value, respectively).opacity
Number
1.0
1.0
riseOnHover
Boolean
false
true
, the marker will get on top of others when you hover the mouse over it.false
true
, the marker will get on top of others when you hover the mouse over it.riseOffset
Number
250
250
riseOnHover
feature.this
this
this
this
this
this
this
this
setOpacity(
<Number> opacity )
this
this
update()
this
this
latLng
object were changed directly.this
this
unbindPopup()
this
this
bindPopup
.openPopup()
this
this
closePopup()
this
this
togglePopup()
this
this
this
this
maxWidth
Number
300
300
minWidth
Number
50
50
maxHeight
Number
null
null
autoPan
Boolean
true
false
if you don't want the map to do panning animation to fit the opened popup.true
false
if you don't want the map to do panning animation to fit the opened popup.keepInView
Boolean
false
true
if you want to prevent users from panning the popup off of the screen while it is open.false
true
if you want to prevent users from panning the popup off of the screen while it is open.closeButton
Boolean
true
true
offset
Point
Point(0, 6)
+ Point(0, 6)
The offset of the popup position. Useful to control the anchor of the popup when opening it on some overlays.
autoPanPaddingTopLeft
Point
null
null
autoPanPaddingBottomRight
Point
null
null
autoPanPadding
Point
Point(5, 5)
+ Point(5, 5)
Equivalent of setting both top left and bottom right autopan padding to the same value.
zoomAnimation
Boolean
true
true
closeOnClick
Boolean
null
false
if you want to override the default behavior of the popup closing when user clicks the map (set globally by the Map
closePopupOnClick
option).null
false
if you want to override the default behavior of the popup closing when user clicks the map (set globally by the Map
closePopupOnClick
option).className
String
''
''
this
this
this
this
map.openPopup(popup)
.this
this
this
this
update()
this
this
minZoom
Number
0
0
maxZoom
Number
18
18
maxNativeZoom
Number
null
null
maxNativeZoom
will be loaded from maxZoom
level and auto-scaled.tileSize
Number
256
256
subdomains
String
or String[]
'abc'
'abc'
errorTileUrl
String
''
''
attribution
String
''
''
tms
Boolean
false
true
, inverses Y axis numbering for tiles (turn this on for TMS services).false
true
, inverses Y axis numbering for tiles (turn this on for TMS services).continuousWorld
Boolean
false
true
, the tile coordinates won't be wrapped by world width (-180 to 180 longitude) or clamped to lie within world height (-90 to 90). Use this if you use Leaflet for maps that don't reflect the real world (e.g. game, indoor or photo maps).false
true
, the tile coordinates won't be wrapped by world width (-180 to 180 longitude) or clamped to lie within world height (-90 to 90). Use this if you use Leaflet for maps that don't reflect the real world (e.g. game, indoor or photo maps).noWrap
Boolean
false
true
, the tiles just won't load outside the world width (-180 to 180 longitude) instead of repeating.false
true
, the tiles just won't load outside the world width (-180 to 180 longitude) instead of repeating.zoomOffset
Number
0
0
zoomReverse
Boolean
false
true
, the zoom number used in tile URLs will be reversed (maxZoom - zoom
instead of zoom
)false
true
, the zoom number used in tile URLs will be reversed (maxZoom - zoom
instead of zoom
)opacity
Number
1.0
1.0
zIndex
Number
null
null
unloadInvisibleTiles
Boolean
true
, all the tiles that are not visible after panning are removed (for better performance). true
by default on mobile WebKit, otherwise false
.true
, all the tiles that are not visible after panning are removed (for better performance). true
by default on mobile WebKit, otherwise false
.updateWhenIdle
Boolean
false
, new tiles are loaded during panning, otherwise only after it (for better performance). true
by default on mobile WebKit, otherwise false
.false
, new tiles are loaded during panning, otherwise only after it (for better performance). true
by default on mobile WebKit, otherwise false
.detectRetina
Boolean
false
true
and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.false
true
and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.reuseTiles
Boolean
false
true
, all the tiles that are not visible after panning are placed in a reuse queue from which they will be fetched when new tiles become visible (as opposed to dynamically creating new ones). This will in theory keep memory usage low and eliminate the need for reserving new memory whenever a new tile is needed.false
true
, all the tiles that are not visible after panning are placed in a reuse queue from which they will be fetched when new tiles become visible (as opposed to dynamically creating new ones). This will in theory keep memory usage low and eliminate the need for reserving new memory whenever a new tile is needed.bounds
LatLngBounds
null
null
this
this
bringToFront()
this
this
bringToBack()
this
this
this
this
this
this
redraw()
this
this
setUrl(
<String> urlTemplate )
this
this
layers
String
''
''
styles
String
''
''
format
String
'image/jpeg'
'image/png'
for layers with transparency).'image/jpeg'
'image/png'
for layers with transparency).transparent
Boolean
false
true
, the WMS service will return images with transparency.false
true
, the WMS service will return images with transparency.version
String
'1.1.1'
'1.1.1'
crs
CRS
null
null
this
noRedraw
was set to true
).this
noRedraw
was set to true
).async
Boolean
false
false
this
this
canvas
is the actual canvas tile on which you can draw, tilePoint
represents the tile numbers, and zoom
is the current zoom.opacity
Number
1.0
1.0
attribution
String
''
''
this
this
this
this
this
this
bringToFront()
this
this
bringToBack()
this
this
stroke
Boolean
true
false
to disable borders on polygons or circles.true
false
to disable borders on polygons or circles.color
String
'#03f'
'#03f'
weight
Number
5
5
opacity
Number
0.5
0.5
fill
Boolean
false
to disable filling on polygons or circles.false
to disable filling on polygons or circles.fillColor
fillOpacity
Number
0.2
0.2
fillRule
String
'evenodd'
'evenodd'
dashArray
String
null
null
lineCap
String
null
null
lineJoin
String
null
null
clickable
Boolean
true
false
, the vector will not emit mouse events and will act as a part of the underlying map.true
false
, the vector will not emit mouse events and will act as a part of the underlying map.pointerEvents
String
null
null
pointer-events
attribute on the path if SVG backend is used.className
String
''
''
this
this
this
this
this
this
unbindPopup()
this
this
bindPopup
.this
this
closePopup()
this
this
this
this
bringToFront()
this
this
bringToBack()
this
this
redraw()
this
this
CANVAS
Boolean
L_PREFER_CANVAS
to true
before the Leaflet include on your page — sometimes it can increase performance dramatically when rendering thousands of circle markers, but currently suffers from a bug that causes removing such layers to be extremely slow.L_PREFER_CANVAS
to true
before the Leaflet include on your page — sometimes it can increase performance dramatically when rendering thousands of circle markers, but currently suffers from a bug that causes removing such layers to be extremely slow.CLIP_PADDING
Number
0.5
for SVG0.02
for VML0.5
for SVG0.02
for VMLsmoothFactor
Number
1.0
1.0
noClip
Boolean
false
false
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
this
Boolean
true
if the given layer is currently added to the group.true
if the given layer is currently added to the group.getLayer(
@@ -3142,7 +3142,7 @@ map.fitBounds(bounds);
clearLayers()
this
this
this
this
group.eachLayer(function (layer) {
layer.bindPopup('Hello');
@@ -3210,7 +3210,7 @@ map.fitBounds(bounds);
this
this
bindPopup
method.setStyle(
<Path options> style )
this
this
setStyle
method.bringToFront()
this
this
bringToBack()
this
this
this
this
this
this
LatLng
reverse
is set to true
, the numbers will be interpreted as (longitude, latitude).reverse
is set to true
, the numbers will be interpreted as (longitude, latitude).coordsToLatLngs(
@@ -3439,7 +3439,7 @@ map.fitBounds(bounds);
Array
levelsDeep
specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default). If reverse
is set to true
, the numbers will be interpreted as (longitude, latitude).levelsDeep
specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default). If reverse
is set to true
, the numbers will be interpreted as (longitude, latitude).Boolean
true
if the given LatLng point is at the same position (within a small margin of error).true
if the given LatLng point is at the same position (within a small margin of error).toString()
LatLng
LatLng
object with the longitude wrapped around left
and right
boundaries (-180
to 180
by default).LatLng
object with the longitude wrapped around left
and right
boundaries (-180
to 180
by default).DEG_TO_RAD
Number
Math.PI / 180
Math.PI / 180
RAD_TO_DEG
Number
180 / Math.PI
180 / Math.PI
MAX_MARGIN
Number
1.0E-9
1.0E-9
this
this
Boolean
true
if the rectangle contains the given one.true
if the rectangle contains the given one.contains(
@@ -3686,7 +3686,7 @@ map.panTo(L.latLng(50, 30));
Boolean
true
if the rectangle contains the given point.true
if the rectangle contains the given point.intersects(
@@ -3694,7 +3694,7 @@ map.panTo(L.latLng(50, 30));
Boolean
true
if the rectangle intersects the given bounds.true
if the rectangle intersects the given bounds.equals(
@@ -3702,12 +3702,12 @@ map.panTo(L.latLng(50, 30));
Boolean
true
if the rectangle is equivalent (within a small margin of error) to the given bounds.true
if the rectangle is equivalent (within a small margin of error) to the given bounds.toBBoxString()
String
'southwest_lng,southwest_lat,northeast_lng,northeast_lat'
format. Useful for sending requests to web services that return geo data.'southwest_lng,southwest_lat,northeast_lng,northeast_lat'
format. Useful for sending requests to web services that return geo data.pad(
@@ -3722,7 +3722,7 @@ map.panTo(L.latLng(50, 30));
Boolean
true
if the bounds are properly initialized.true
if the bounds are properly initialized.x
and y
coordinates. If optional round
is set to true
, rounds the x
and y
values.x
and y
coordinates. If optional round
is set to true
, rounds the x
and y
values.Point
round
is set to true
, returns a rounded result.round
is set to true
, returns a rounded result.distanceTo(
@@ -3847,7 +3847,7 @@ map.panBy(L.point(200, 300));
Boolean
true
if the given point has the same coordinates.true
if the given point has the same coordinates.contains(
@@ -3855,7 +3855,7 @@ map.panBy(L.point(200, 300));
Boolean
true
if the both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).true
if the both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).toString()
Boolean
true
if the rectangle contains the given one.true
if the rectangle contains the given one.contains(
@@ -3960,7 +3960,7 @@ map.panBy(L.point(200, 300));
Boolean
true
if the rectangle contains the given point.true
if the rectangle contains the given point.intersects(
@@ -3968,13 +3968,13 @@ map.panBy(L.point(200, 300));
Boolean
true
if the rectangle intersects the given bounds.true
if the rectangle intersects the given bounds.isValid()
Boolean
true
if the bounds are properly initialized.true
if the bounds are properly initialized.getSize()
By default, it has a 'leaflet-div-icon'
class and is styled as a little white square with a shadow.
By default, it has a 'leaflet-div-icon'
class and is styled as a little white square with a shadow.
className
String
- 'leaflet-div-icon'
by default.'leaflet-div-icon'
by default.html
position
String
'topright'
'topright'
this
this
this
this
this
this
'topleft'
'topleft'
'topright'
'topright'
'bottomleft'
'bottomleft'
'bottomright'
'bottomright'
A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its zoomControl
option to false
. Extends Control.
A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its zoomControl
option to false
. Extends Control.
position |
String |
- 'topleft' |
+ 'topleft' |
The position of the control (one of the map corners). See control positions. |
zoomInText |
String |
- '+' |
+ '+' |
The text set on the zoom in button. |
zoomOutText |
String |
- '-' |
+ '-' |
The text set on the zoom out button. |
zoomInTitle |
String |
- 'Zoom in' |
+ 'Zoom in' |
The title set on the zoom in button. |
zoomOutTitle |
String |
- 'Zoom out' |
+ 'Zoom out' |
The title set on the zoom out button. |
The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its attributionControl
option to false
, and it fetches attribution texts from layers with getAttribution
method automatically. Extends Control.
The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its attributionControl
option to false
, and it fetches attribution texts from layers with getAttribution
method automatically. Extends Control.
position |
String |
- 'bottomright' |
+ 'bottomright' |
The position of the control (one of the map corners). See control positions. | |
prefix |
String |
- 'Leaflet' |
- The HTML text shown before the attributions. Pass false to disable. |
+ 'Leaflet' |
+ The HTML text shown before the attributions. Pass false to disable. |
setPrefix(
<String> prefix )
this
this
addAttribution(
<String> text )
this
'Vector data © Mapbox'
).this
'Vector data © Mapbox'
).removeAttribution(
<String> text )
this
this
this
this
this
this
removeLayer(
<ILayer> layer )
this
this
position
String
'topright'
'topright'
collapsed
Boolean
true
true
, the control will be collapsed into an icon and expanded on mouse hover or touch.true
true
, the control will be collapsed into an icon and expanded on mouse hover or touch.autoZIndex
Boolean
true
true
, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.true
true
, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.position
String
'bottomleft'
'bottomleft'
maxWidth
Number
100
100
metric
Boolean
true
true
imperial
Boolean
true
true
updateWhenIdle
Boolean
false
true
, the control is updated on moveend
, otherwise it's always up-to-date (updated on move
).false
true
, the control is updated on moveend
, otherwise it's always up-to-date (updated on move
).A set of methods shared between event-powered classes (like Map). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map 'click'
event).
A set of methods shared between event-powered classes (like Map). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map 'click'
event).
this
fn
) to a particular event type of the object. You can optionally specify the context of the listener (object the this
keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick'
).this
fn
) to a particular event type of the object. You can optionally specify the context of the listener (object the this
keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick'
).addOneTimeEventListener(
@@ -4648,7 +4648,7 @@ map.off('click', onClick);
this
this
this
this
{click: onClick, mousemove: onMouseMove}
this
this
addEventListener
, you must pass the same context to removeEventListener
in order to remove the listener.this
this
removeEventListener()
this
this
clearAllEventListeners
when you use it without arguments.Boolean
true
if a particular event type has some listeners attached to it.true
if a particular event type has some listeners attached to it.fireEvent(
@@ -4699,33 +4699,33 @@ map.off('click', onClick);
this
this
clearAllEventListeners()
this
this
on( … )
this
this
addEventListener
.once( … )
this
this
addOneTimeEventListener
.off( … )
this
this
removeEventListener
.fire( … )
this
this
fireEvent
.type
String
'click'
).'click'
).target
ie
Boolean
true
for all Internet Explorer versions.true
for all Internet Explorer versions.ie6
Boolean
true
for Internet Explorer 6.true
for Internet Explorer 6.ie7
Boolean
true
for Internet Explorer 7.true
for Internet Explorer 7.webkit
Boolean
true
for webkit-based browsers like Chrome and Safari (including mobile versions).true
for webkit-based browsers like Chrome and Safari (including mobile versions).webkit3d
Boolean
true
for webkit-based browsers that support CSS 3D transformations.true
for webkit-based browsers that support CSS 3D transformations.android
Boolean
true
for Android mobile browser.true
for Android mobile browser.android23
Boolean
true
for old Android stock browsers (2 and 3).true
for old Android stock browsers (2 and 3).mobile
Boolean
true
for modern mobile browsers (including iOS Safari and different Android browsers).true
for modern mobile browsers (including iOS Safari and different Android browsers).mobileWebkit
Boolean
true
for mobile webkit-based browsers.true
for mobile webkit-based browsers.mobileOpera
Boolean
true
for mobile Opera.true
for mobile Opera.touch
Boolean
true
for all browsers on touch devices.true
for all browsers on touch devices.msTouch
Boolean
true
for browsers with Microsoft touch model (e.g. IE10).true
for browsers with Microsoft touch model (e.g. IE10).retina
Boolean
true
for devices with Retina screens.true
for devices with Retina screens.Function
fn
with the given scope obj
(so that this
keyword refers to obj
inside the function code). Has an L.bind
shortcut. Not a polyfill for ES 5 bind
(compare L.bind
to the MDN-recommended polyfill for Function.prototype.bind
).fn
with the given scope obj
(so that this
keyword refers to obj
inside the function code). Has an L.bind
shortcut. Not a polyfill for ES 5 bind
(compare L.bind
to the MDN-recommended polyfill for Function.prototype.bind
).stamp( <Object> obj )
falseFn()
Function
false
.false
.formatNum(
@@ -5351,7 +5351,7 @@ MyClass.FOO; // 'bar'
String
{a: "foo", b: "bar"}
'?a=foo&b=bar'
.{a: "foo", b: "bar"}
'?a=foo&b=bar'
.template(
@@ -5359,7 +5359,7 @@ MyClass.FOO; // 'bar'
String
'Hello {a}, {b}'
and a data object like {a: 'foo', b: 'bar'}
, returns evaluated string ('Hello foo, bar'
). You can also specify functions instead of strings for data values — they will be evaluated passing data
as an argument.'Hello {a}, {b}'
and a data object like {a: 'foo', b: 'bar'}
, returns evaluated string ('Hello foo, bar'
). You can also specify functions instead of strings for data values — they will be evaluated passing data
as an argument.isArray(
@@ -5367,7 +5367,7 @@ MyClass.FOO; // 'bar'
Boolean
true
if the given object is an array.true
if the given object is an array.trim(
@@ -5562,8 +5562,8 @@ MyClass.FOO; // 'bar'
this
fn
to the element's DOM event of the specified type. this
keyword inside the listener will point to context
, or to the element if not specified.this
fn
to the element's DOM event of the specified type. this
keyword inside the listener will point to context
, or to the element if not specified.removeListener(
@@ -5572,7 +5572,7 @@ MyClass.FOO; // 'bar'
this
this
this
this
L.DomEvent.addListener(div, 'click', function (e) {
L.DomEvent.stopPropagation(e);
@@ -5592,7 +5592,7 @@ MyClass.FOO; // 'bar'
this
this
href
of the a
element, or doing a POST
request with page reload when form
is submitted). Use it inside listener functions.
this
this
stopPropagation
and preventDefault
at the same time.this
stopPropagation
to the element's 'click'
, 'doubleclick'
, 'mousedown'
and 'touchstart'
events.this
stopPropagation
to the element's 'click'
, 'doubleclick'
, 'mousedown'
and 'touchstart'
events.getMousePosition(
@@ -5700,7 +5700,7 @@ MyClass.FOO; // 'bar'
Boolean
true
if the element class attribute contains name
.true
if the element class attribute contains name
.addClass(
@@ -5736,8 +5736,8 @@ MyClass.FOO; // 'bar'
String
or false
false
. Useful for vendor-prefixed styles like transform
.String
or false
false
. Useful for vendor-prefixed styles like transform
.getTranslateString(
@@ -5764,7 +5764,7 @@ MyClass.FOO; // 'bar'
point
, using CSS translate or top/left positioning depending on the browser (used by Leaflet internally to position its layers). Forces top/left positioning if disable3D
is true
.point
, using CSS translate or top/left positioning depending on the browser (used by Leaflet internally to position its layers). Forces top/left positioning if disable3D
is true
.getPosition(
@@ -5788,7 +5788,7 @@ MyClass.FOO; // 'bar'
TRANSITION
String
'webkitTransition'
for WebKit).'webkitTransition'
for WebKit).TRANSFORM
@@ -5837,8 +5837,8 @@ fx.run(el, [300, 500], 0.5);
this
0.25
by default) and easing linearity factor (3rd argument of the cubic bezier curve, 0.5
by default)this
0.25
by default) and easing linearity factor (3rd argument of the cubic bezier curve, 0.5
by default)START
String
'mousedown'
for desktop browsers, 'touchstart'
for mobile devices.'mousedown'
for desktop browsers, 'touchstart'
for mobile devices.MOVE
String
'mousemove'
for desktop browsers, 'touchmove'
for mobile devices.'mousemove'
for desktop browsers, 'touchmove'
for mobile devices.END
String
'mouseup'
for desktop browsers, 'touchend'
for mobile devices.'mouseup'
for desktop browsers, 'touchend'
for mobile devices.enabled()
Boolean
true
if the handler is enabled.true
if the handler is enabled.code
String
'EPSG:3857'
).'EPSG:3857'
).Global switches are created for rare cases and generally make Leaflet to not detect a particular browser feature even if it's there. You need to set the switch as a global variable to true
before including Leaflet on the page, like this:
Global switches are created for rare cases and generally make Leaflet to not detect a particular browser feature even if it's there. You need to set the switch as a global variable to true
before including Leaflet on the page, like this:
<script>L_PREFER_CANVAS = true;</script>
<script src="leaflet.js"></script>