Leaflet-Tutorial

About Leaflet

Leaflet is an open-source JavaScript library initially released in 2011 that is used for creating interactive web maps. You can think of it as a collection of pre-written JavaScript which takes on the most challenging work of mapping behind the scenes. Using only two or three basic JavaScript expressions, you can create a simple map in Leaflet, or you can build something much more complex with hundreds of lines of code. The choice is yours and the tools are there!

What is web-mapping?

A web map is not just a digital map which exists and can be accessed on the web, but also something that is powered by it. This allows for expanded user interactivity and connection to other web resources, servers, and databases.

Like the spatial information presented in GIS software, web maps are typically composed of one or more layers belonging to two general categories:

  1. Background layers: also called basemaps, these consist of collections of vector tiles, or gridded images, and are most often designed for general use, rather than specifically prepared for any one map; these layers are typically static and non-interactive
  2. Foreground layers: also called overlays, these typically consist of vector layers (points, lines, or ploygons) which have been specifically perpared or fine-tuned for use in a single web map; these layers are typically dynamic and tied to some form of user interaction

Leaflet and other web-mapping tools:

While Leaflet is arguably one of the most popular open-source web-mapping tools currently available, a number of other JavaScript libraries exist, each with their own advantages and disadvantages (which may change depending on the exact needs of your project!). Here are a few more popular options that are good to be aware of:


< Home Next >