Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 33 KB of JS, 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, can be extended with lots 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.
Here we create a map in the 'map'
div, add tiles of our choice, and then add a marker with some text in a popup:
var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.marker([51.5, -0.09]).addTo(map)
.bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
.openPopup();
Learn more with the quick start guide, check out other tutorials, or head straight to the API documentation. If you have any questions, take a look at the FAQ first.
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 easily extended by third-party plugins.
+/-
keys)EPSG:3857/4326/3395
out of the box)If you find some feature really missing in Leaflet, please vote for it on the Leaflet UserVoice page.
Lets create the best mapping library that will ever exist! Leaflet is developed by Vladimir Agafonkin of Mapbox with a team of dedicated contributors. Pull requests are always welcome. However, there are many more ways to get involved with the development of Leaflet.
You can help the project tremendously by discovering and reporting bugs, improving documentation, helping others on the Leaflet forum and GitHub issues, showing your support for your favorite feature suggestions on Leaflet UserVoice page, tweeting to @LeafletJS and spreading the word about Leaflet among your colleagues and friends.
Check out the contribution guide for more information on getting involved with Leaflet development.