Leaflet/features.html

152 lines
4.6 KiB
HTML
Raw Normal View History

2012-07-17 01:21:00 +08:00
---
layout: default
title: Features
---
2012-07-24 06:41:55 +08:00
<h2>Leaflet Features</h2>
2012-07-17 01:21:00 +08:00
2012-07-19 07:00:36 +08:00
<p>Leaflet doesn't try to do everything for everyone. Instead it focuses on making <em>the basic things work perfectly</em>. It should still satisfy the needs of the vast majority of map apps developers while being easily extended by <a href="plugins.html">third-party plugins</a>.</p>
2012-07-17 01:21:00 +08:00
2012-07-18 21:41:48 +08:00
<hr />
2012-07-17 01:21:00 +08:00
<div class="span-20" id="features">
<div class="span-6">
2012-07-18 21:41:48 +08:00
<h3>Available Map Layers</h3>
2012-07-17 01:21:00 +08:00
<ul>
<li>Tile layers</li>
<li>Markers</li>
<li>Popups</li>
2012-07-24 06:41:55 +08:00
<li>Vector layers<span class="quiet">: polylines, polygons, circles, rectangles, circle markers</li>
2012-07-17 01:21:00 +08:00
<li>Image overlays</li>
<li>WMS layers</li>
2012-07-24 06:41:55 +08:00
<li>Layer groups</li>
<li>GeoJSON layers</li>
2011-05-17 02:41:30 +08:00
</ul>
2012-02-04 02:33:34 +08:00
2012-07-18 21:41:48 +08:00
<h3>Interaction Features</h3>
2012-07-24 06:41:55 +08:00
<h4>General</h4>
<ul>
<li>Drag panning with inertia</li>
</ul>
2012-07-18 21:41:48 +08:00
<h4>On Desktop Browsers</h4>
2012-07-17 01:21:00 +08:00
<ul>
<li>Scroll wheel zoom</li>
<li>Double click zoom</li>
2012-07-27 23:34:24 +08:00
<li>Zoom to area <span class="quiet">(shift-drag)</span></li>
<li>Keyboard navigation <span class="quiet"><nobr>(with arrows and <code>+/-</code> keys)</nobr></span></li>
2012-07-17 01:21:00 +08:00
</ul>
2012-07-18 21:41:48 +08:00
<h4>On Mobile Browsers</h4>
2012-07-18 21:41:48 +08:00
2012-07-17 01:21:00 +08:00
<ul>
<li>Multi-touch zoom <nobr><span class="quiet">(iOS, Android 4+, Win8)</span></nobr></li>
2012-07-17 01:21:00 +08:00
<li>Double tap zoom</li>
</ul>
2012-07-18 21:41:48 +08:00
2012-07-24 06:41:55 +08:00
<h4>For Layers</h4>
2012-07-18 21:41:48 +08:00
2012-07-17 01:21:00 +08:00
<ul>
2012-07-24 06:41:55 +08:00
<li>Various events<span class="quiet">: click (tap), mouseover, contextmenu, etc.</span></li>
<li>Marker dragging</li>
2012-07-17 01:21:00 +08:00
</ul>
2012-07-24 06:41:55 +08:00
<!--<li>Vector layers editing</li>-->
2012-07-17 01:21:00 +08:00
</div>
2011-05-17 02:41:30 +08:00
2012-07-17 01:21:00 +08:00
<div class="span-9">
2012-07-18 21:41:48 +08:00
<h3>Visual Features</h3>
2012-07-17 01:21:00 +08:00
<ul>
<li>Zoom animation <span class="quiet">(<nobr>for all layers</nobr>, including tile layers, markers and vector layers)</span></li>
2012-07-17 01:21:00 +08:00
<li>Panning animation</li>
<li>Smooth continuous zoom on modern mobile devices</li>
2012-07-17 01:21:00 +08:00
<li>Tile and popup fade animation</li>
<li>Very nice default design for markers, popups and other map controls</li>
<li>Retina resolution support for tile layers and markers</li>
2012-07-17 01:21:00 +08:00
</ul>
2012-02-04 02:33:34 +08:00
2012-07-18 21:41:48 +08:00
<h3>Customization Features</h3>
2012-07-17 01:21:00 +08:00
<ul>
<li>Pure CSS3 popups and controls <span class="quiet">for easy restyling</span></li>
2012-07-24 06:41:55 +08:00
<li>Image- and HTML-based markers</li>
2012-07-17 01:21:00 +08:00
<!-- <li>Customizable marker icons</li> -->
<li><span class="quiet">A simple interface for implementing</span> custom map layers</li>
<li><span class="quiet">The same for</span> custom map controls</li>
<li>Custom map projections <span class="quiet">(with <code>EPSG:4326</code>, <code>EPSG:3857</code> and <code>EPSG:3395</code> out of the box)</span></li>
2012-07-24 06:41:55 +08:00
<li>Powerful OOP facilities <span class="quiet">for extending existing classes</span></p>
2012-07-17 01:21:00 +08:00
</ul>
2012-02-04 02:33:34 +08:00
2012-07-18 21:41:48 +08:00
<h3>Performance Features</h3>
2012-07-17 01:21:00 +08:00
<ul>
<li>Hardware acceleration on iOS <span class="quiet">(and other modern browsers) makes it feel as smooth as native apps</span></li>
2012-07-24 06:41:55 +08:00
<li>Utilizing CSS3 features <span class="quiet">like Transitions, Transforms, requestAnimationFrame where possible</span> to make panning and zooming really smooth</li>
<li>Smart polyline/polygon rendering <span class="quiet">with dynamic clipping and simplification makes it responsive even when displaying objects with thousands of points</span></li>
<li>Modular design and a build system<span class="quiet"> allow you to reduce the library size by leaving out features you don't need</span></li>
<li>Tap delay elimination on mobile devices<span class="quiet"> makes controls and layers respond to taps immediately</span></li>
2012-07-17 01:21:00 +08:00
</ul>
2012-07-18 21:41:48 +08:00
2011-05-17 02:41:30 +08:00
</div>
2012-02-04 02:33:34 +08:00
2012-07-17 01:21:00 +08:00
<div class="span-5 last">
2012-07-18 21:41:48 +08:00
<h3>Map Controls</h3>
2012-07-17 01:21:00 +08:00
<ul>
<li>Zoom buttons</li>
<li>Attribution</li>
<li>Layer switcher</li>
<li>Scale</li>
</ul>
2011-06-17 06:56:11 +08:00
2012-07-18 21:41:48 +08:00
<h3>Browser Support</h3>
<h4>On Desktop</h4>
2012-07-17 01:21:00 +08:00
<ul>
<li>Chrome</li>
<li>Firefox</li>
<li>Safari 5+</li>
<li>Opera 11.11+</li>
<li>IE 7&ndash;10</li>
2012-07-17 01:21:00 +08:00
<li>IE 6 <span class="quiet">(not perfect but accessible)</span></li>
</ul>
2012-07-18 21:41:48 +08:00
<h4>On Mobile</h4>
2012-07-17 01:21:00 +08:00
<ul>
<li>Safari for iOS 3/4/5/6+</li>
2012-07-17 01:21:00 +08:00
<li>Android browser 2.2+,&nbsp;3.1+,&nbsp;4+</li>
<li>Chrome for Android 4+ and iOS</li>
<li>Firefox for Android</li>
2012-07-24 06:41:55 +08:00
<li>Other webkit-based browsers (webOS, Blackberry 7+, etc.)</li>
<li>IE10 for Win8-based devices</li>
2012-07-17 01:21:00 +08:00
</ul>
2012-07-24 06:41:55 +08:00
<h3>Misc</h3>
<ul>
<li>Extremely lightweight <span class="quiet">&mdash; around 28 KB of gzipped JS code</span></li>
2012-07-24 06:41:55 +08:00
<li>No external dependencies</li>
<li>Keeps your JS environment clean<span class="quiet"> &mdash; no global or native prototypes pollution</span></li>
</ul>
2012-07-17 01:21:00 +08:00
</div>
</div>
2012-02-21 23:14:40 +08:00
2012-07-18 21:41:48 +08:00
<hr />
<p>If you find some feature really missing in Leaflet, please vote for it on the <a href="https://leaflet.uservoice.com">Leaflet UserVoice page</a>.</p>