Version bump to 1.0.0; update 1.0.0 docs based on leafdoc (#4940)

This commit is contained in:
Iván Sánchez Ortega 2016-09-26 15:21:40 +02:00 committed by Vladimir Agafonkin
parent 62712fe0d0
commit 79d8837b1f
2 changed files with 269 additions and 57 deletions

View File

@ -6,7 +6,7 @@ bodyclass: api-page
<h2>API Reference</h2>
<p>This reference reflects <strong>Leaflet 1.0.0-rc3</strong>.</p>
<p>This reference reflects <strong>Leaflet 1.0.0</strong>.</p>
<p>Docs for 0.7 are <a href='reference.html'>available here</a>.
@ -693,13 +693,13 @@ for the first time).</td>
<tr id='map-zoom'>
<td><code><b>zoom</b>
<td><code><a href='#event'>Event</a></code></td>
<td>Fired repeteadly during any change in zoom level, including zoom
<td>Fired repeatedly during any change in zoom level, including zoom
and fly animations.</td>
</tr>
<tr id='map-move'>
<td><code><b>move</b>
<td><code><a href='#event'>Event</a></code></td>
<td>Fired repeteadly during any movement of the map, including pan and
<td>Fired repeatedly during any movement of the map, including pan and
fly animations.</td>
</tr>
<tr id='map-zoomend'>
@ -825,7 +825,7 @@ for a second (also called long press).</td>
</tr>
<tr id='map-keypress'>
<td><code><b>keypress</b>
<td><code><a href='#event'>Event</a></code></td>
<td><code><a href='#keyboardevent'>KeyboardEvent</a></code></td>
<td>Fired when the user presses a key from the keyboard while the map is focused.</td>
</tr>
<tr id='map-preclick'>
@ -1125,7 +1125,7 @@ pan by default.</p>
</td>
</tr>
<tr id='map-flyto'>
<td><code><b>flyTo</b>(<nobr>&lt;<a href='#latlng'>LatLng</a>&gt;</nobr> <i>latlng</i>, <nobr>&lt;Number&gt;</nobr> <i>zoom?</i>, <nobr>&lt;Zoom/Pan options&gt;</nobr> <i>options?</i>)</nobr></code></td>
<td><code><b>flyTo</b>(<nobr>&lt;<a href='#latlng'>LatLng</a>&gt;</nobr> <i>latlng</i>, <nobr>&lt;Number&gt;</nobr> <i>zoom?</i>, <nobr>&lt;<a href='#zoom/pan-options'>Zoom/pan options</a>&gt;</nobr> <i>options?</i>)</nobr></code></td>
<td><code>this</code></td>
<td><p>Sets the view of the map (geographical center and zoom) performing a smooth
pan-zoom animation.</p>
@ -2109,7 +2109,7 @@ panning inertia).</td>
<td><code><b>icon</b></code></td>
<td><code><a href='#icon'>Icon</a></code>
<td><code>*</code></td>
<td>Icon class to use for rendering the marker. See <a href="#icon">Icon documentation</a> for details on how to customize the marker icon. Set to new <code>L.Icon.Default()</code> by default.</td>
<td>Icon class to use for rendering the marker. See <a href="#icon">Icon documentation</a> for details on how to customize the marker icon. If not specified, a new <a href="#icon-default"><code>L.Icon.Default</code></a> is used.</td>
</tr>
<tr id='marker-draggable'>
<td><code><b>draggable</b></code></td>
@ -2929,6 +2929,12 @@ off of the screen while it is open.</td>
the popup closing when user clicks the map (set globally by
the Map&#39;s <a href="#map-closepopuponclick">closePopupOnClick</a> option).</td>
</tr>
<tr id='popup-classname'>
<td><code><b>className</b></code></td>
<td><code>String</code>
<td><code>&#x27;&#x27;</code></td>
<td>A custom CSS class name to assign to the popup.</td>
</tr>
</tbody></table>
</section>
@ -2957,19 +2963,6 @@ the Map&#39;s <a href="#map-closepopuponclick">closePopupOnClick</a> option).</t
<td>The offset of the popup position. Useful to control the anchor
of the popup when opening it on some overlays.</td>
</tr>
<tr id='popup-zoomanimation'>
<td><code><b>zoomAnimation</b></code></td>
<td><code>Boolean</code>
<td><code>true</code></td>
<td>Whether to animate the popup on zoom. Disable it if you have
problems with Flash content inside popups.</td>
</tr>
<tr id='popup-classname'>
<td><code><b>className</b></code></td>
<td><code>String</code>
<td><code>&#x27;&#x27;</code></td>
<td>A custom CSS class name to assign to the popup.</td>
</tr>
<tr id='popup-pane'>
<td><code><b>pane</b></code></td>
<td><code>String</code>
@ -3600,13 +3593,6 @@ position on the map.</td>
<th>Description</th>
</tr>
</thead><tbody>
<tr id='tooltip-zoomanimation'>
<td><code><b>zoomAnimation</b></code></td>
<td><code>Boolean</code>
<td><code>true</code></td>
<td>Whether to animate the popup on zoom. Disable it if you have
problems with Flash content inside popups.</td>
</tr>
<tr id='tooltip-classname'>
<td><code><b>className</b></code></td>
<td><code>String</code>
@ -4237,7 +4223,8 @@ from <code>maxNativeZoom</code> level and auto-scaled.</td>
<td><code>Boolean</code>
<td><code>false</code></td>
<td>Whether the layer is wrapped around the antimeridian. If <code>true</code>, the
GridLayer will only be displayed once at low zoom levels.</td>
GridLayer will only be displayed once at low zoom levels. Has no
effect when the <a href="#map-crs">map CRS</a> doesn&#39;t wrap around.</td>
</tr>
<tr id='tilelayer-pane'>
<td><code><b>pane</b></code></td>
@ -4504,7 +4491,7 @@ Classes extending <a href="#tilelayer"><code>TileLayer</code></a> can override t
</tr>
<tr id='tilelayer-getcontainer'>
<td><code><b>getContainer</b>()</nobr></code></td>
<td><code>String</code></td>
<td><code>HTMLElement</code></td>
<td><p>Returns the HTML element that contains the tiles for this layer.</p>
</td>
</tr>
@ -5117,7 +5104,8 @@ from <code>maxNativeZoom</code> level and auto-scaled.</td>
<td><code>Boolean</code>
<td><code>false</code></td>
<td>Whether the layer is wrapped around the antimeridian. If <code>true</code>, the
GridLayer will only be displayed once at low zoom levels.</td>
GridLayer will only be displayed once at low zoom levels. Has no
effect when the <a href="#map-crs">map CRS</a> doesn&#39;t wrap around.</td>
</tr>
<tr id='tilelayer-wms-pane'>
<td><code><b>pane</b></code></td>
@ -5389,7 +5377,7 @@ callback is called when the tile has been loaded.</p>
</tr>
<tr id='tilelayer-wms-getcontainer'>
<td><code><b>getContainer</b>()</nobr></code></td>
<td><code>String</code></td>
<td><code>HTMLElement</code></td>
<td><p>Returns the HTML element that contains the tiles for this layer.</p>
</td>
</tr>
@ -6028,7 +6016,7 @@ for a second (also called long press).</td>
</tr>
</thead><tbody>
<tr id='imageoverlay-setopacity'>
<td><code><b>setOpacity</b>()</nobr></code></td>
<td><code><b>setOpacity</b>(<nobr>&lt;Number&gt;</nobr> <i>opacity</i>)</nobr></code></td>
<td><code>this</code></td>
<td><p>Sets the opacity of the overlay.</p>
</td>
@ -11303,6 +11291,33 @@ e.g. 0.1 would be 10% of map view in each direction</td>
<div class='accordion'>
<label><span class='expander'></span> Events inherited from <a href='#renderer'>Renderer</a></label>
<div class='accordion-overflow'>
<div class='accordion-content'><section >
<table><thead>
<tr>
<th>Event</th>
<th>Data</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr id='svg-update'>
<td><code><b>update</b>
<td><code><a href='#event'>Event</a></code></td>
<td>Fired when the renderer updates its bounds, center and zoom, for example when
its map has moved</td>
</tr>
</tbody></table>
</section></div>
</div>
</div>
<div class='accordion'>
<label><span class='expander'></span> Events inherited from <a href='#layer'>Layer</a></label>
<div class='accordion-overflow'>
@ -11866,6 +11881,33 @@ e.g. 0.1 would be 10% of map view in each direction</td>
<div class='accordion'>
<label><span class='expander'></span> Events inherited from <a href='#renderer'>Renderer</a></label>
<div class='accordion-overflow'>
<div class='accordion-content'><section >
<table><thead>
<tr>
<th>Event</th>
<th>Data</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr id='canvas-update'>
<td><code><b>update</b>
<td><code><a href='#event'>Event</a></code></td>
<td>Fired when the renderer updates its bounds, center and zoom, for example when
its map has moved</td>
</tr>
</tbody></table>
</section></div>
</div>
</div>
<div class='accordion'>
<label><span class='expander'></span> Events inherited from <a href='#layer'>Layer</a></label>
<div class='accordion-overflow'>
@ -12854,7 +12896,14 @@ properties. The event might can optionally be propagated to event parents.</p>
</div>
</div>
</section><h2 id='featuregroup'>FeatureGroup</h2><p>Extended <a href="#layergroup"><code>LayerGroup</code></a> that also has mouse events (propagated from members of the group) and a shared bindPopup method.</p>
</section><h2 id='featuregroup'>FeatureGroup</h2><p>Extended <a href="#layergroup"><code>LayerGroup</code></a> that makes it easier to do the same thing to all its member layers:</p>
<ul>
<li><a href="#layer-bindpopup"><code>bindPopup</code></a> binds a popup to all of the layers at once (likewise with <a href="#layer-bindtooltip"><code>bindTooltip</code></a>)</li>
<li>Events are propagated to the <a href="#featuregroup"><code>FeatureGroup</code></a>, so if the group has an event
handler, it will handle events from any of the layers. This includes mouse events
and custom events.</li>
<li>Has <code>layeradd</code> and <code>layerremove</code> events</li>
</ul>
<section>
<h3 id='featuregroup-example'>Usage example</h3>
@ -12867,7 +12916,7 @@ properties. The event might can optionally be propagated to event parents.</p>
<pre><code class="lang-js">L.featureGroup([marker1, marker2, polyline])
.bindPopup(&#39;Hello world!&#39;)
.on(&#39;click&#39;, function() { alert(&#39;Clicked on a group!&#39;); })
.on(&#39;click&#39;, function() { alert(&#39;Clicked on a member of the group!&#39;); })
.addTo(map);
</code></pre>
@ -12934,11 +12983,35 @@ properties. The event might can optionally be propagated to event parents.</p>
</div>
</section><section>
<h3 id=''>Events</h3>
<h3 id='featuregroup-event'>Events</h3>
<section >
<table><thead>
<tr>
<th>Event</th>
<th>Data</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr id='featuregroup-layeradd'>
<td><code><b>layeradd</b>
<td><code><a href='#layerevent'>LayerEvent</a></code></td>
<td>Fired when a layer is added to this <a href="#featuregroup"><code>FeatureGroup</code></a></td>
</tr>
<tr id='featuregroup-layerremove'>
<td><code><b>layerremove</b>
<td><code><a href='#layerevent'>LayerEvent</a></code></td>
<td>Fired when a layer is removed from this <a href="#featuregroup"><code>FeatureGroup</code></a></td>
</tr>
</tbody></table>
</section>
<div class='accordion'>
<label><span class='expander'></span> Events inherited from <a href='#layer'>Layer</a></label>
<div class='accordion-overflow'>
@ -13493,7 +13566,7 @@ GeoJSON data and display it on the map. Extends <a href="#featuregroup"><code>Fe
<pre><code class="lang-js">L.geoJson(data, {
<pre><code class="lang-js">L.geoJSON(data, {
style: function (feature) {
return {color: feature.properties.color};
}
@ -13639,6 +13712,37 @@ The default is the <code>coordsToLatLng</code> static method.</td>
<div class='accordion'>
<label><span class='expander'></span> Events inherited from <a href='#featuregroup'>FeatureGroup</a></label>
<div class='accordion-overflow'>
<div class='accordion-content'><section >
<table><thead>
<tr>
<th>Event</th>
<th>Data</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr id='geojson-layeradd'>
<td><code><b>layeradd</b>
<td><code><a href='#layerevent'>LayerEvent</a></code></td>
<td>Fired when a layer is added to this <a href="#featuregroup"><code>FeatureGroup</code></a></td>
</tr>
<tr id='geojson-layerremove'>
<td><code><b>layerremove</b>
<td><code><a href='#layerevent'>LayerEvent</a></code></td>
<td>Fired when a layer is removed from this <a href="#featuregroup"><code>FeatureGroup</code></a></td>
</tr>
</tbody></table>
</section></div>
</div>
</div>
<div class='accordion'>
<label><span class='expander'></span> Events inherited from <a href='#layer'>Layer</a></label>
<div class='accordion-overflow'>
@ -14425,7 +14529,8 @@ GridLayer can be extended to create a tiled grid of HTML elements like <code>&lt
<td><code>Boolean</code>
<td><code>false</code></td>
<td>Whether the layer is wrapped around the antimeridian. If <code>true</code>, the
GridLayer will only be displayed once at low zoom levels.</td>
GridLayer will only be displayed once at low zoom levels. Has no
effect when the <a href="#map-crs">map CRS</a> doesn&#39;t wrap around.</td>
</tr>
<tr id='gridlayer-pane'>
<td><code><b>pane</b></code></td>
@ -14628,7 +14733,7 @@ GridLayer will only be displayed once at low zoom levels.</td>
</tr>
<tr id='gridlayer-getcontainer'>
<td><code><b>getContainer</b>()</nobr></code></td>
<td><code>String</code></td>
<td><code>HTMLElement</code></td>
<td><p>Returns the HTML element that contains the tiles for this layer.</p>
</td>
</tr>
@ -15664,7 +15769,7 @@ overlap if their intersection is an area.</p>
});
L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);
</code></pre>
<p><code>L.Icon.Default</code> extends <a href="#icon"><code>L.Icon</code></a> and is the blue icon Leaflet uses for markers by default.</p>
<p><a href="#icon-default"><code>L.Icon.Default</code></a> extends <a href="#icon"><code>L.Icon</code></a> and is the blue icon Leaflet uses for markers by default.</p>
@ -16245,6 +16350,42 @@ properties. The event might can optionally be propagated to event parents.</p>
</div>
</div>
</section><span id='icon-default'></span>
<section>
<h3 id='icon-default-option'>Icon.Default</h3>
<section >
<div class='section-comments'>A trivial subclass of <a href="#icon"><code>Icon</code></a>, represents the icon to use in <a href="#marker"><code>Marker</code></a>s when
no icon is specified. Points to the blue marker image distributed with Leaflet
releases.
In order to change the default icon, just change the properties of <code>L.Icon.Default.prototype.options</code>
(which is a set of <a href="#icon-option"><code>Icon options</code></a>).</div>
<table><thead>
<tr>
<th>Option</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr id='icon-default-imagepath'>
<td><code><b>imagePath</b></code></td>
<td><code>String</code>
<td><code></code></td>
<td><a href="#icon-default"><code>L.Icon.Default</code></a> will try to auto-detect the absolute location of the
blue icon images. If you are placing these images in a non-standard
way, set this option to point to the right absolute path.</td>
</tr>
</tbody></table>
</section>
</section><h2 id='divicon'>DivIcon</h2><p>Represents a lightweight icon for markers that uses a simple <code>&lt;div&gt;</code>
element instead of an image. Inherits from <a href="#icon"><code>Icon</code></a> but ignores the <code>iconUrl</code> and shadow options.</p>
@ -20567,18 +20708,18 @@ pixel coordinates for a particular zoom. For example, it returns
<tr id='crs-zoom'>
<td><code><b>zoom</b>(<nobr>&lt;Number&gt;</nobr> <i>scale</i>)</nobr></code></td>
<td><code>Number</code></td>
<td><p>Inverse of <code>scale()</code>, returns the zoom level correspondingto a scale
<td><p>Inverse of <code>scale()</code>, returns the zoom level corresponding to a scale
factor of <code>scale</code>.</p>
</td>
</tr>
<tr id='crs-getprojectedbounds'>
<td><code><b>getProjectedBounds</b>(<i>zoom</i>)</nobr></code></td>
<td><code><b>getProjectedBounds</b>(<nobr>&lt;Number&gt;</nobr> <i>zoom</i>)</nobr></code></td>
<td><code><a href='#bounds'>Bounds</a></code></td>
<td><p>Returns the projection&#39;s bounds scaled and transformed for the provided <code>zoom</code>.</p>
</td>
</tr>
<tr id='crs-distance'>
<td><code><b>distance</b>(<nobr>&lt;<a href='#latlng'>LatLng</a>&gt;</nobr> <i>latlng1</i>)</nobr></code></td>
<td><code><b>distance</b>(<nobr>&lt;<a href='#latlng'>LatLng</a>&gt;</nobr> <i>latlng1</i>, <nobr>&lt;<a href='#latlng'>LatLng</a>&gt;</nobr> <i>latlng2</i>)</nobr></code></td>
<td><code>Number</code></td>
<td><p>Returns the distance between two geographical coordinates.</p>
</td>
@ -20618,14 +20759,14 @@ CRS&#39;s <code>wrapLat</code> and <code>wrapLng</code> properties, if they are
<tr id='crs-wraplng'>
<td><code><b>wrapLng</b>
<td><code>Number[]</code></td>
<td>An array of two numbers defining whether the longitude coordinate axis
wraps around a given range and how. Defaults to <code>[-180, 180]</code> in most
geographical CRSs.</td>
<td>An array of two numbers defining whether the longitude (horizontal) coordinate
axis wraps around a given range and how. Defaults to <code>[-180, 180]</code> in most
geographical CRSs. If <code>undefined</code>, the longitude axis does not wrap around.</td>
</tr>
<tr id='crs-wraplat'>
<td><code><b>wrapLat</b>
<td><code>Number[]</code></td>
<td>Like <code>wrapLng</code>, but for the latitude axis.</td>
<td>Like <code>wrapLng</code>, but for the latitude (vertical) axis.</td>
</tr>
<tr id='crs-infinite'>
<td><code><b>infinite</b>
@ -20749,11 +20890,31 @@ e.g. 0.1 would be 10% of map view in each direction</td>
</div>
</section><section>
<h3 id=''>Events</h3>
<h3 id='renderer-event'>Events</h3>
<section >
<table><thead>
<tr>
<th>Event</th>
<th>Data</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr id='renderer-update'>
<td><code><b>update</b>
<td><code><a href='#event'>Event</a></code></td>
<td>Fired when the renderer updates its bounds, center and zoom, for example when
its map has moved</td>
</tr>
</tbody></table>
</section>
<div class='accordion'>
<label><span class='expander'></span> Events inherited from <a href='#layer'>Layer</a></label>
<div class='accordion-overflow'>
@ -21201,6 +21362,64 @@ information about the event. For example:</p>
</section>
</section><span id='keyboardevent'></span>
<section>
<h3 id='keyboardevent-property'>KeyboardEvent</h3>
<section >
<table><thead>
<tr>
<th>Property</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr id='keyboardevent-originalevent'>
<td><code><b>originalEvent</b>
<td><code>DOMEvent</code></td>
<td>The original <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent">DOM <a href="#keyboardevent"><code>KeyboardEvent</code></a></a> that triggered this Leaflet event.</td>
</tr>
</tbody></table>
</section>
<div class='accordion'>
<label><span class='expander'></span> Properties inherited from <a href='#event'>Event</a></label>
<div class='accordion-overflow'>
<div class='accordion-content'><section >
<table><thead>
<tr>
<th>Property</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr id='keyboardevent-type'>
<td><code><b>type</b>
<td><code>String</code></td>
<td>The event type (e.g. <code>&#39;click&#39;</code>).</td>
</tr>
<tr id='keyboardevent-target'>
<td><code><b>target</b>
<td><code>Object</code></td>
<td>The object that fired the event.</td>
</tr>
</tbody></table>
</section></div>
</div>
</div>
</section><span id='mouseevent'></span>
<section>
@ -21235,8 +21454,8 @@ information about the event. For example:</p>
</tr>
<tr id='mouseevent-originalevent'>
<td><code><b>originalEvent</b>
<td><code>DOM MouseEvent</code></td>
<td>The original <a href="https://developer.mozilla.org/docs/Web/API/MouseEvent">DOM mouse event</a> fired by the browser.</td>
<td><code>DOMEvent</code></td>
<td>The original <a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent">DOM <a href="#mouseevent"><code>MouseEvent</code></a></a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent">DOM <code>TouchEvent</code></a> that triggered this Leaflet event.</td>
</tr>
</tbody></table>
@ -22016,13 +22235,6 @@ information about the event. For example:</p>
<td><code>Point(0, 7)</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 id='divoverlay-zoomanimation'>
<td><code><b>zoomAnimation</b></code></td>
<td><code>Boolean</code>
<td><code>true</code></td>
<td>Whether to animate the popup on zoom. Disable it if you have
problems with Flash content inside popups.</td>
</tr>
<tr id='divoverlay-classname'>
<td><code><b>className</b></code></td>
@ -22499,7 +22711,7 @@ var Leaflet = L.noConflict();
<div class="footer">
<p>© 2015 <a href="http://agafonkin.com/en">Vladimir Agafonkin</a>. Maps © <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors.</p>
<p>© 2016 <a href="http://agafonkin.com/en">Vladimir Agafonkin</a>. Maps © <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors.</p>
</div>
</div>

View File

@ -1,6 +1,6 @@
{
"name": "leaflet",
"version": "1.0.0-rc.3",
"version": "1.0.0",
"description": "JavaScript library for mobile-friendly interactive maps",
"devDependencies": {
"eslint": "^3.5.0 <3.6.0",