From 951addabcd071067a49eaef442e218ab47e254cd Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Wed, 26 Jun 2013 09:08:40 -0400 Subject: [PATCH] finish 0.6 docs --- reference.html | 146 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 99 insertions(+), 47 deletions(-) diff --git a/reference.html b/reference.html index a21dbf88..b2d358c2 100644 --- a/reference.html +++ b/reference.html @@ -398,6 +398,12 @@ var map = L.map('map', { depends Whether the tile zoom animation is enabled. By default it's enabled in all browsers that support CSS3 Transitions except Android. + + zoomAnimationThreshold + Number + 4 + Won't animate zoom if the zoom difference exceeds this value. + markerZoomAnimation Boolean @@ -602,51 +608,63 @@ var map = L.map('map', { setView( <LatLng> center, <Number> zoom, - <Boolean> forceReset? ) + <zoom/pan options> options? ) this - Sets the view of the map (geographical center and zoom). If forceReset is set to true, the map is reloaded even if it's eligible for pan or zoom animation (false by default). + Sets the view of the map (geographical center and zoom) with the given animation options. setZoom( - <Number> zoom ) + <Number> zoom, + <zoom options> options? ) this Sets the zoom of the map. - zoomIn( <Number> delta? ) + zoomIn( + <Number> delta?, + <zoom options> options? ) + this Increases the zoom of the map by delta (1 by default). - zoomOut( <Number> delta? ) + zoomOut( + <Number> delta?, + <zoom options> options? ) + this Decreases the zoom of the map by delta (1 by default). setZoomAround( <LatLng> latlng, - <Number> zoom ) + <Number> zoom, + <zoom options> options? ) this Zooms the map while keeping a specified point on the map stationary (e.g. used internally for scroll zoom and double-click zoom). fitBounds( - <LatLngBounds> bounds ) + <LatLngBounds> bounds, + <fitBounds options> options? ) this Sets a map view that contains the given geographical bounds with the maximum zoom level possible. - fitWorld() + fitWorld( + <fitBounds options> options? ) + this Sets a map view that mostly contains the whole world with the maximum zoom level possible. panTo( - <LatLng> latlng ) + <LatLng> latlng, + <pan options> options? ) this Pans the map to a given center. Makes an animated pan if new center is not more than one screen away from the current one. @@ -660,17 +678,19 @@ var map = L.map('map', { panBy( - <Point> point ) + <Point> point, + <pan options> options? ) this Pans the map by a given number of pixels (animated). invalidateSize( - <Boolean> animate? ) + <Boolean> options?, + <zoom/pan options> options? ) this - Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically. If animate is true, map animates the update. + Checks if the map container size changed and updates the map if so — call it after you've changed the map size dynamically, also animating pan by default. If options.pan is false, panning will not occur. setMaxBounds( @@ -1011,7 +1031,7 @@ var map = L.map('map', { -

zoom/pan options

+

Zoom/pan options

@@ -1026,6 +1046,12 @@ var map = L.map('map', { + + + + + + @@ -1033,14 +1059,14 @@ var map = L.map('map', { - - - - + + + +
false If true, the map view will be completely reset (without any animations).
panpan options-Sets the options for the panning (without the zoom change) if it occurs.
zoom zoom optionsSets the options for the zoom change if it occurs.
zoomzoom options-Sets the options for the panning (without the zoom change) if it occurs.animateBoolean-An equivalent of passing animate to both zoom and pan options (see below).
-

zoom/pan options

+

Pan options

@@ -1050,26 +1076,32 @@ var map = L.map('map', { - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - +
Description
resetanimateBoolean-If 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).
durationNumber0.25Duration of animated panning.
easeLinearityNumber0.25The curvature factor of panning animation easing (third parameter of the Cubic Bezier curve). 1.0 means linear animation, the less the more bowed the curve.
noMoveStart Boolean falseIf true, the map view will be completely reset (without any animations).
zoomzoom options-Sets the options for the zoom change if it occurs.
zoomzoom options-Sets the options for the panning (without the zoom change) if it occurs.If true, panning won't fire movestart event on start (used internally for panning inertia).
-

zoom/pan options

+

Zoom options

@@ -1079,25 +1111,45 @@ var map = L.map('map', { - + - - - - - - - - - - - - - +
Description
resetanimate BooleanfalseIf true, the map view will be completely reset (without any animations).
zoomzoom options -Sets the options for the zoom change if it occurs.
zoomzoom options-Sets the options for the panning (without the zoom change) if it occurs.If not specified, zoom animation will happen if the zoom origin is inside the current view. If true, the map will attempt animating zoom disregarding where zoom origin is. Setting false will make it always reset the view completely without animation.
+

fitBounds options

+ +

The same as zoom/pan options and additionally:

+ + + + + + + + + + + + + + + + + + + + + + + +
OptionTypeDefaultDescription
paddingTopLeftPoint[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.
paddingBottomRightPoint[0, 0] + The same for bottom right corner of the map.
paddingPoint[0, 0] + Equivalent of setting both top left and bottom right padding to the same value.
+ +

Properties

Map properties include interaction handlers that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging or touch zoom (see IHandler methods). Example: