
For thorough documentation, see the Leaflet site. Click the "View this example on its own" link underneath a map to see complete code.
#CREATE A CUSTOM MAP FOR A WEBSITE CODE#
Many code blocks show only a snippet of code, highlighting the changes over previous examples. It won't explain every little object or array, but will contain plenty of links.
#CREATE A CUSTOM MAP FOR A WEBSITE HOW TO#
It assumes a basic knowledge of HTML and JavaScript, or at the very least assumes the will to tinker with the code to better understand what it does-and how to use it for your own work.

How this tutorial works: It's structured around examples that progressively build upon one another, starting from scratch and ending with slightly advanced techniques.

If you need total freedom of form, interaction, transitions, and map projections, consider working with something like D3. Leaflet is also not GIS, although it can be combined with tools like CartoDB for GIS-like capabilities. What Leaflet does not do: Provide any data for you! Leaflet is a framework for showing and interacting with map data, but it's up to you to provide that data, including a basemap. See Anatomy of a Web Map for an introduction to the most common kinds of web maps, which is what Leaflet is good for. It will also work well across most types of devices. It handles various basic tasks like converting data to map layers and mouse interactions, and it's easy to extend with plugins. What Leaflet does: "Slippy" maps with tiled base layers, panning and zooming, and feature layers that you supply.

Leaflet is developed by Vladimir Agafonkin (currently of MapBox) and other contributors. It's lightweight, simple, and flexible, and is probably the most popular open-source mapping library at the moment. Leaflet is an open-source JavaScript library for interactive web maps. It was written by Andy Woodruff, Ryan Mullins and Cristen Jones for Maptime Boston, but you don't need to be with us to follow along. Don't worry it's easy! This is an introduction to web maps using Leaflet.
