Leaflet

A Modern, Lightweight Open-Source JavaScript Library for Interactive Maps by CloudMade

Leaflet features

Leaflet doesn't try to do everything for everyone. Instead it focuses on making the basic things work perfectly. It should still satisfy the needs of the vast majority of map apps developers while being flexible enough to be easily extended by writing third-party plugins.

Available map layers

  • Tile layers
  • Vector layers: polylines, polygons, circles, circle markers
  • Markers
  • Popups
  • Image overlays
  • WMS layers
  • GeoJSON

Interaction features

On desktop browsers

  • Drag panning
  • Scroll wheel zoom
  • Double click zoom
  • Shift-drag zoom to bounding box

On mobile browsers (iOS, Android)

  • Touch-drag panning
  • Multi-touch zoom (iOS only)
  • Double tap zoom

Other features

  • Panning inertia
  • Vector layers editing

Visual features

  • Panning animation
  • Zooming animation on modern browsers (except IE)
  • Smooth continuous zoom on iOS
  • Tile and popup fade animation
  • Very nice default design for markers, popups and other map controls

Customization features

  • Pure CSS3 popups and controls for easy restyling
  • A simple interface for implementing custom map layers
  • The same for custom map controls
  • Custom map projections (with EPSG:4326, EPSG:3857 and EPSG:3395 out of the box)

Performance features

  • Hardware acceleration on iOS (and other modern browsers) makes it feel as smooth as native apps
  • Clever tricks to make panning and zooming really smooth
  • Smart polyline/polygon rendering makes it responsive even when displaying objects with thousands of points
  • Modular design and a build system allow you to reduce the size of the library by leaving out the code you don't need

Map controls

  • Zoom buttons
  • Attribution
  • Layer switcher
  • Scale

Browser support

On desktop

  • Firefox 3.6+
  • Chrome
  • Safari 5+
  • Opera 11.11+
  • IE 7–9
  • IE 6 (not perfect but accessible)

On mobile

  • Safari for iOS 3/4/5+
  • WebKit for Android 2.2+, 3.1+, 4+
  • Other webkit-based browsers (webOS, Blackberry 6+, etc.)
  • Windows Phone 7
  • Firefox for Android

If you find some feature really missing in Leaflet, please vote for it on the Leaflet UserVoice page.

* Grayed out features are in the roadmap and coming soon.


© 2012 CloudMade. Map data © 2012 OpenStreetMap contributors, CC-BY-SA.

Fork me on GitHub