JavaScript library for mobile-friendly interactive maps

Leaflet is a widely used open source JavaScript library used to build web mapping applications. It helps us to quickly publish maps like this:

Here is a code excerpt showing key commands, like centering the map on a particular location, loading a tile layer, and adding a visual marker:

var map = L.map('map').setView([47.55662, 8.90370], 16);

L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
L.marker([47.55662, 8.90370], {icon: greenIcon}).bindPopup("Hello, world.").addTo(map);

Visit leafletjs.com for details and examples. There is a tutorial in German here.


Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 39 KB of gzipped JS plus 4 KB of gzipped CSS code, it has all the mapping features most developers ever need.

Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms out of the box, taking advantage of HTML5 and CSS3 on modern browsers while being accessible on older ones too. It can be extended with a huge amount of plugins, has a beautiful, easy to use and well-documented API and a simple, readable source code that is a joy to contribute to.

For more info, docs and tutorials, check out the official website.
For Leaflet downloads (including the built master version), check out the download page.

We're happy to meet new contributors. If you want to get involved with Leaflet development, check out the contribution guide. Let's make the best mapping library that will ever exist, and push the limits of what's possible with online maps!

Build Status

Loading ...
Go back