Merge branch 'gh-pages' into gh-pages-master

This commit is contained in:
Vladimir Agafonkin 2012-06-23 19:25:57 +03:00
commit 540f9ae792

View File

@ -941,6 +941,18 @@ map.addLayer(marker);</code></pre>
<td><code>false</code></td>
<td>Whether the marker is draggable with mouse/touch or not.</td>
</tr>
<tr>
<td><code>title</code></td>
<td><code>String</code></td>
<td></td>
<td>Text for the browser tooltip that appear on marker hover (no tooltip by default).</td>
</tr>
<tr id="marker-zindexoffset">
<td><code>zIndexOffset</code></td>
<td><code>Number</code></td>
<td><code>0</code></td>
<td>By default, marker images zIndex is set automatically based on its latitude. You this option if you want to put the marker on top of all others (or below), specifying a high value like <code>1000</code> (or high negative value, respectively).</td>
</tr>
</table>
<h3>Events</h3>
@ -955,14 +967,29 @@ map.addLayer(marker);</code></pre>
</tr>
<tr>
<td><code>click</code></td>
<td><code><a href="#event">Event</a></code>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the user clicks (or taps) the marker.</td>
</tr>
<tr>
<td><code>dblclick</code></td>
<td><code><a href="#event">Event</a></code>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the user double-clicks (or double-taps) the marker.</td>
</tr>
<tr>
<td><code>mousedown</code></td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the user pushes the mouse button on the marker.</td>
</tr>
<tr>
<td><code>mouseover</code></td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the mouse enters the marker.</td>
</tr>
<tr>
<td><code>mouseout</code></td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the mouse leaves the marker.</td>
</tr>
<tr>
<td><code>dragstart</code></td>
<td><code><a href="#event">Event</a></code>
@ -998,16 +1025,36 @@ map.addLayer(marker);</code></pre>
<td><code>this</code></td>
<td>Changes the marker position to the given point.</td>
</tr>
<tr>
<td><code>setIcon( <nobr>&lt;<a href="#icon">Icon</a>&gt; <i>icon</i> )</nobr></code></td>
<td><code>this</code></td>
<td>Changes the marker icon.</td>
</tr>
<tr>
<td><code>setZIndexOffset( <nobr>&lt;Number&gt; <i>offset</i> )</nobr></code></td>
<td><code>this</code></td>
<td>Changes the <a href="#marker-zindexoffset">zIndex offset</a> of the marker.</td>
</tr>
<tr id="#marker-bindpopup">
<td><code>bindPopup( <nobr>&lt;String&gt; <i>htmlContent</i>,</nobr> <nobr>&lt;<a href="#popup-options">Popup options</a>&gt; <i>options?</i> )</nobr></code></td>
<td><code>this</code></td>
<td>Binds a popup with a particular HTML content to a click on this marker. You can also open the bound popup with the Marker <a href="#marker-openpopup">openPopup</a> method.</td>
</tr>
<tr id="#marker-unbindpopup">
<td><code>unbindPopup()</code></td>
<td><code>this</code></td>
<td>Unbinds the popup previously bound to the marker with <code>bindPopup</code>.</td>
</tr>
<tr id="#marker-openpopup">
<td><code>openPopup()</code></td>
<td><code>this</code></td>
<td>Opens the popup previously bound by the <a href="#marker-bindpopup">bindPopup</a> method.</td>
</tr>
<tr id="#marker-closepopup">
<td><code>closePopup()</code></td>
<td><code>this</code></td>
<td>Closes the bound popup of the marker if it's opened.</td>
</tr>
</table>
<h3 id="marker-interaction-handlers">Interaction handlers</h3>
@ -1075,11 +1122,17 @@ map.openPopup(popup);</code></pre>
<td><code>300</code></td>
<td>Max width of the popup.</td>
</tr>
<tr>
<td><code>maxWidth</code></td>
<td><code>Number</code></td>
<td><code>50</code></td>
<td>Min width of the popup.</td>
</tr>
<tr>
<td><code>autoPan</code></td>
<td><code>Boolean</code></td>
<td><code>true</code></td>
<td>Set it to false if you don't want the map to do panning animation to fit the opened popup.'</td>
<td>Set it to false if you don't want the map to do panning animation to fit the opened popup.</td>
</tr>
<tr>
<td><code>closeButton</code></td>
@ -1093,6 +1146,12 @@ map.openPopup(popup);</code></pre>
<td><code><nobr>Point(0, 0)</nobr></code></td>
<td>The offset of the popup position. Useful to control the anchor of the popup when opening it on some overlays.</td>
</tr>
<tr>
<td><code>autoPanPadding</code></td>
<td><code><a href="#point">Point</a></code></td>
<td><code><nobr>Point(5, 5)</nobr></code></td>
<td>The margin between the popup and the edges of the map view after autopanning was performed.</td>
</tr>
</table>
<h3>Methods</h3>
@ -1202,6 +1261,36 @@ map.openPopup(popup);</code></pre>
<td><code>'xyz'</code></td>
<td>Either <code>'xyz'</code> or <code>'tms'</code>, affects tile numbering (TMS servers use inverse Y axis numbering).</td>
</tr>
<tr>
<td><code>continuousWorld</code></td>
<td><code>Boolean</code></td>
<td><code>false</code></td>
<td>If set to <code>true</code>, 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).</td>
</tr>
<tr>
<td><code>noWrap</code></td>
<td><code>Boolean</code></td>
<td><code>false</code></td>
<td>If set to <code>true</code>, the tiles just won't load outside the world width (-180 to 180 longitude) instead of repeating.</td>
</tr>
<tr>
<td><code>zoomOffset</code></td>
<td><code>Number</code></td>
<td><code>0</code></td>
<td>The zoom number used in tile URLs will be offset with this value.</td>
</tr>
<tr>
<td><code>zoomReverse</code></td>
<td><code>Boolean</code></td>
<td><code>false</code></td>
<td>If set to <code>true</code>, the zoom number used in tile URLs will be reversed (<code>maxZoom - zoom</code> instead of <code>zoom</code>)</td>
</tr>
<tr>
<td><code>opacity</code></td>
<td><code>Number</code></td>
<td><code>1.0</code></td>
<td>The opacity of the tile layer.</td>
</tr>
<tr>
<td><code>unloadInvisibleTiles</code></td>
<td><code>Boolean</code></td>
@ -1218,7 +1307,27 @@ map.openPopup(popup);</code></pre>
<td><code>reuseTiles</code></td>
<td><code><code>Boolean</code></code></td>
<td>false</td>
<td>If <code>true</code>, 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 keep memory usage low and eliminate the need for reserving new memory whenever a new tile is needed.</td>
<td>If <code>true</code>, 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.</td>
</tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<th>Method</th>
<th>Returns</th>
<th>Description</th>
</tr>
<tr>
<td><code>setOpacity( <nobr>&lt;Number&gt; <i>opacity</i> )</nobr></code></td>
<td><code>this</code></td>
<td>Changes the opacity of the tile layer.</td>
</tr>
<tr>
<td><code>redraw()</code></td>
<td>-</td>
<td>Calling <code>redraw</code> will cause the <code>drawTile</code> method to be called for all tiles. May be used for updating dynamic content drawn on the Canvas</td>
</tr>
</table>
@ -1444,14 +1553,29 @@ var image = new L.ImageOverlay(
</tr>
<tr>
<td><code>click</code></td>
<td><code><a href="#event">Event</a></code>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the user clicks (or taps) the object.</td>
</tr>
<tr>
<td><code>dblclick</code></td>
<td><code><a href="#event">Event</a></code>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the user double-clicks (or double-taps) the object.</td>
</tr>
<tr>
<td><code>mousedown</code></td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the user pushes the mouse button on the object.</td>
</tr>
<tr>
<td><code>mouseover</code></td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the mouse enters the object.</td>
</tr>
<tr>
<td><code>mouseout</code></td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the mouse leaves the object.</td>
</tr>
</table>
<h3>Constants</h3>
@ -1474,6 +1598,12 @@ var image = new L.ImageOverlay(
<td>depends</td>
<td>True if VML is used for vector rendering (IE 6-8).</td>
</tr>
<tr>
<td><code>L.Path.CANVAS</code></td>
<td><code>Boolean</code></td>
<td>depends</td>
<td>True if Canvas is used for vector rendering (Android 2). You can also force this by setting global variable <code>L_PREFER_CANVAS</code> to true <em>before</em> 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.</td>
</tr>
<tr>
<td><code>L.Path.CLIP_PADDING</code></td>
<td><code>Number</code></td>
@ -1904,20 +2034,30 @@ map.addLayer(group);</code></pre>
</tr>
<tr>
<td><code>click</code></td>
<td><code><a href="#event">Event</a></code>
<td>Fired when the user clicks (or taps) on the group.</td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the user clicks (or taps) the group.</td>
</tr>
<tr>
<td><code>dblclick</code></td>
<td><code><a href="#event">Event</a></code>
<td>Fired when the user double-clicks (or double-taps) on the group.</td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the user double-clicks (or double-taps) the group.</td>
</tr>
<tr>
<td><code>mouseover</code></td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the mouse enters the group.</td>
</tr>
<tr>
<td><code>mouseout</code></td>
<td><code><a href="#mouse-event">MouseEvent</a></code>
<td>Fired when the mouse leaves the group.</td>
</tr>
</table>
<h2 id="geojson">L.GeoJSON</h2>
<p>Represents a <a href="http://geojson.org/geojson-spec.html">GeoJSON</a> layer. Allows you to parse GeoJSON data and display on the map. Extends <a href="#layergroup">LayerGroup</a>.</p>
<p>Represents a <a href="http://geojson.org/geojson-spec.html">GeoJSON</a> layer. Allows you to parse GeoJSON data and display on the map. Extends <a href="#featuregroup">FeatureGroup</a>.</p>
<pre><code class="javascript">var geojson = new L.GeoJSON();
@ -2007,14 +2147,14 @@ map.addLayer(geojson);</code></pre>
<td>Creates a layer from a given GeoJSON geometry.</td>
</tr>
<tr>
<td><code>coordsToLatlng( <nobr>&lt;Array&gt; <i>coords</i> )</nobr></code></td>
<td><code>coordsToLatlng( <nobr>&lt;Array&gt; <i>coords</i></nobr>, <nobr>&lt;Boolean&gt; <i>reverse?</i> )</nobr></code></td>
<td><code><a href="#latlng">LatLng</a></code></td>
<td>Creates a LatLng object from an array of 2 numbers used in GeoJSON for points.</td>
<td>Creates a LatLng object from an array of 2 numbers (latitude, longitude) used in GeoJSON for points. If <code>reverse</code> is set to <code>true</code>, the numbers will be interpreted as (longitude, latitude).</td>
</tr>
<tr>
<td><code>coordsToLatlngs( <nobr>&lt;Array&gt; <i>coords</i></nobr>, <nobr>&lt;Number&gt; <i>levelsDeep?</i> )</nobr></code></td>
<td><code>coordsToLatlngs( <nobr>&lt;Array&gt; <i>coords</i></nobr>, <nobr>&lt;Number&gt; <i>levelsDeep?</i></nobr>, <nobr>&lt;Boolean&gt; <i>reverse?</i> )</nobr></code></td>
<td><code>Array</code></td>
<td>Creates a multidimensional array of LatLng objects from a GeoJSON coordinates array. <code>levelsDeep</code> specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default).</td>
<td>Creates a multidimensional array of LatLng objects from a GeoJSON coordinates array. <code>levelsDeep</code> specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default). If <code>reverse</code> is set to <code>true</code>, the numbers will be interpreted as (longitude, latitude).</td>
</tr>
</table>
@ -2035,7 +2175,7 @@ map.addLayer(geojson);</code></pre>
</tr>
<tr>
<td><code>L.LatLng( <nobr>&lt;Number&gt; <i>latitude</i></nobr>, <nobr>&lt;Number&gt; <i>longitude</i></nobr>, <nobr>&lt;Boolean&gt; <i>noWrap?</i> )</nobr></code></td>
<td>Creates a LatLng object with the given latitude and longitude. Wraps longitude to lie between -180 and 180 and clamps longitude between -90 and 90 by default &mdash; you can disable this with the noWrap argument.</td>
<td>Creates an object representing a geographical point with the given latitude and longitude. Wraps longitude to lie between <code>-180</code> and <code>180</code> and clamps longitude between <code>-90</code> and <code>90</code> by default &mdash; you can disable this with the <code>noWrap</code> argument.</td>
</tr>
</table>
@ -2201,7 +2341,7 @@ map.addLayer(geojson);</code></pre>
<tr>
<td><code>toBBoxString()</code></td>
<td><code>String</code></td>
<td>Returns a string with bounding box coordinates in a "southwest_lng,southwest_lat,northeast_lng,northeast_lat" format. Useful for sending requests to web services that return geo data.</td>
<td>Returns a string with bounding box coordinates in a <code>"southwest_lng,southwest_lat,northeast_lng,northeast_lat"</code> format. Useful for sending requests to web services that return geo data.</td>
</tr>
</table>
@ -2220,8 +2360,8 @@ map.addLayer(geojson);</code></pre>
<th>Description</th>
</tr>
<tr>
<td><code>L.Point( <nobr>&lt;Number&gt; <i>x</i>, &lt;Number&gt; <i>y</i> )</nobr></code></td>
<td>Creates a Point object with the given x and y coordinates.</td>
<td><code>L.Point( <nobr>&lt;Number&gt; <i>x</i>, &lt;Number&gt; <i>y</i></nobr>, <nobr>&lt;Boolean&gt; <i>round?</i> )</nobr></code></td>
<td>Creates a Point object with the given <code>x</code> and <code>y</code> coordinates. If optional <code>round</code> is set to <code>true</code>, rounds the <code>x</code> and <code>y</code> values.</td>
</tr>
</table>
@ -2269,9 +2409,9 @@ map.addLayer(geojson);</code></pre>
<td>Returns the result of multiplication of the current point by the given number.</td>
</tr>
<tr>
<td><code>divideBy( <nobr>&lt;Number&gt; <i>number</i> )</nobr></code></td>
<td><code>divideBy( <nobr>&lt;Number&gt; <i>number</i></nobr>, <nobr>&lt;Boolean&gt; <i>round?</i> )</nobr></code></td>
<td><code><a href="#point">Point</a></code></td>
<td>Returns the result of division of the current point by the given number.</td>
<td>Returns the result of division of the current point by the given number. If optional <code>round</code> is set to <code>true</code>, returns a rounded result.</td>
</tr>
<tr>
<td><code>distanceTo( <nobr>&lt;<a href="#point">Point</a>&gt; <i>otherPoint</i> )</nobr></code></td>
@ -2313,10 +2453,10 @@ map.addLayer(geojson);</code></pre>
</tr>
<tr>
<td><code>L.Bounds( <nobr>&lt;<a href="#point">Point</a>&gt; <i>topLeft</i></nobr>, <nobr>&lt;<a href="#point">Point</a>&gt; <i>bottomRight</i> )</nobr></code></td>
<td>Creates a Bounds object by defining top-left and bottom-right coordinates of the rectangle.</td>
<td>Creates a Bounds object from two coordinates (usually top-left and bottom-right corners).</td>
</tr>
<tr>
<td><code>L.LatLngBounds( <nobr>&lt;<a href="#point">Point</a>[]&gt;points )</nobr></code></td>
<td><code>L.LatLngBounds( <nobr>&lt;<a href="#point">Point</a>[]&gt; <i>points</i> )</nobr></code></td>
<td>Creates a Bounds object defined by the points it contains.</td>
</tr>
</table>
@ -2786,20 +2926,20 @@ map.addControl(layersControl);</code></pre>
</tr>
</table>
<h3 id="popup-event">Popup event</h3>
<h3 id="popup-event">Popup event</h3>
<table>
<tr>
<th>property</th>
<th>type</th>
<th>description</th>
</tr>
<tr>
<td><code>popup</code></td>
<td><code><a href="#popup">Popup</a></code></td>
<td>The popup that was opened or closed.</td>
</tr>
</table>
<table>
<tr>
<th>property</th>
<th>type</th>
<th>description</th>
</tr>
<tr>
<td><code>popup</code></td>
<td><code><a href="#popup">Popup</a></code></td>
<td>The popup that was opened or closed.</td>
</tr>
</table>
<!-- <h3>TileEvent</h3> -->