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
  • Polylines, polygons, circles
  • Markers
  • Popups
  • Image overlays
  • 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
  • Panning inertia

Visual features

  • Panning and zooming animation
  • Smooth continuous zoom on iOS
  • Tile and popup fade animation on modern browsers
  • Very nice default design for markers and popups

Customization features

  • Pure CSS3 popups for easy restyling
  • A simple interface for implementing custom map layers
  • The same for custom map controls
  • Ability to implement custom map projections

Performance features

  • Hardware acceleration on iOS makes it feel as smooth as native apps
  • Smart polyline/polygon rendering makes it responsive even when displaying objects with thousands of points
  • Modular build system allows you to reduce the size of the library by leaving out the code you don't need

Map controls

  • Zoom buttons
  • Zoom silder
  • Attribution
  • Scale

Browser support

On desktop

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

On mobile

  • Safari for iOS 3/4+
  • WebKit for Android 2.2+

If you find some feature really missing in Leaflet, please submit it to the issue tracker.


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

Fork me on GitHub