new polyline methods docs

This commit is contained in:
Mourner 2011-05-25 19:11:45 +03:00
parent 69761d2de3
commit 0221151957

View File

@ -1242,10 +1242,36 @@ map.addLayer(polyline);</code></pre>
</tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<th>Method</th>
<th>Returns</th>
<th>Description</th>
</tr>
<tr>
<td><code>addLatLng( &lt;<a href="#latlng">LatLng</a>&gt;&nbsp;<i>latlng</i>&nbsp;)</code></td>
<td><code>this</code></td>
<td>Adds a given point to the polyline.</td>
</tr>
<tr>
<td><code>setLatLngs( &lt;<a href="#latlng">LatLng</a>[]&gt;&nbsp;<i>latlngs</i>&nbsp;)</code></td>
<td><code>this</code></td>
<td>Replaces all the points in the polyline with the given array of geographical points.</td>
</tr>
<tr>
<td><code>spliceLatLngs( &lt;Number&gt;&nbsp;<i>index</i>, &lt;Number&gt;&nbsp;<i>pointsToRemove</i>, &lt;<a href="#latlng">LatLng</a>&gt;&nbsp;<i>latlng1?</i>, &lt;<a href="#latlng">LatLng</a>&gt;&nbsp;<i>latlng2?</i>,&nbsp;&hellip;&nbsp;)</code></td>
<td><code><a href="#latlng">LatLng</a>[]</code></td>
<td>Allows adding, removing or replacing points in the polyline. Syntax is the same as in <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice">Array#splice</a>. Returns the array of removed points (if any).</td>
</tr>
</table>
<h2 id="polygon">L.Polygon</h2>
<p>A class for drawing polygon overlays on a map. Extends Polyline. Use <a href="#map-addlayer">Map#addLayer</a> to add it to the map.</p>
<p>A class for drawing polygon overlays on a map. Extends <a href="#polyline">Polyline</a>. Use <a href="#map-addlayer">Map#addLayer</a> to add it to the map.</p>
<h3>Constructor</h3>
@ -1260,6 +1286,8 @@ map.addLayer(polyline);</code></pre>
</tr>
</table>
<p>Polygon the same options and methods as Polyline.</p>
<h2 id="circle">L.Circle</h2>