Launched in 2010, Leaflet is an open-source library of Javascript code for the creation of interactive web-based maps. It operates using .json geospatial data and map tiles from external sources (Leaflet provides no basemaps of its own). It has been used in commercial contexts as well as academic projects, and it has been under private, individual ownership since 2010. While Leaflet is not the only library of Javascript mapping functions, it stands out for its comparatively long history, extensive documentation, and wide base of contributors and volunteers.

 At its most basic, Leaflet accommodates fairly static maps, which can feature .json geospatial data (point or coverage), image overlays, and basic layer manipulation. But because it is a code base rather than an application, its functionality is limited only by the functionality of Javascript itself—an adept programmer could integrate a timeline manipulation function, multimedia, interactive pop-up boxes, or other features to increase interactivity and dynamism.



Example Applications

Maps created on the Leaflet code base can have a wide variety of interactive features, and can take on diverse appearances. One fairly representative sample in digital humanities is Bomb Sight: Mapping the WWII Bomb Census, a project of the British National Archives. In addition to a web-based interactive map, Bomb Sight also offers a mobile Android application to facilitate walking tours. Clicking on map features offers pop-up information boxes, which include hyperlinks to geographically relevant digitized archival collections. The modest layer manipulation, interactive CSS-styled information-boxes, and optional inclusion of historical map overlays are all standard features from the Leaflet library. This project demonstrates the level of interactivity possible even within the fairly modest interactivity offered by Leaflet.

A very different project is Urban Layers, an architectural history of Manhattan Island. This project is built on Leaflet indirectly by way of Mapbox.js, an advanced Leaflet-derived Javascript library produced by the same corporation behind the main Mapbox tool. Urban Layers offers a timeline manipulation tool that allows users to watch Manhattan urbanize over a given time frame. Urban Layers lacks the depth of archival information offered by Bomb Sight, but it demonstrates the additional interactivity and data filtering that can be introduced to Leaflet via additional Javascript.

Digital Humanities Potential

From its most basic applications to its most complex, Leaflet maps anonymize and singularize their authorship; furthermore, contributions must be filtered through a project designer who is comfortable with coding. Leaflet is therefore inappropriate for crowdsourced projects, or any other projects which require plural authorship or clearly-articulated attribution. On the other hand, Leaflet’s hospitality to mobile application development makes it a worthy tool for outreach to the public even if it is not particularly welcoming to public contributions. Mobile apps developed with Leaflet could facilitate laypeople’s discovery of sites of historical, architectural, or cultural importance, or could serve as a walking tour of relevant locations to a single literary work.

Features like raster map overlays and multimedia pop-up boxes make Leaflet an especially good fit for museum and archival collection outreach. Images and other media can be associated with geographic coordinates with relative ease, and information boxes could lead site visitors to similarly-cataloged materials within a collection.

Adding in additional Javascript features, such as timeline manipulation and other data filtering, could introduce a layer of conceptual complexity to a digital humanities mapping project. One can envision a map which charts the shifting ethnic demographics or the progression of gentrification in a historically impoverished neighborhoodor, perhaps, a revision of Bomb Sight which displays a time-lapse of the Blitz instead of a static map. While adding technical complexity is not necessary to make Leaflet a useful and versatile tool, for certain projects, it may be worth the effort.

Advantages

Leaflet is free, open-source, and specifically designed to be hospitable to mobile application development as well as Web-based embedding. Its library of tutorials and extensive documentation are easily accessed, and may mitigate the challenges of technical implementation. Its functionality potential is limited only by the functions offered by Javascript itself, and thus it has the potential to support highly interactive and information-rich projects.

Because its built-in look-and-feel features are minimal, Leaflet’s appearance is immensely customizable through CSS and base map customization; it can use any map tiles, whether prefabricated or designed from scratch, and the tutorials offer tips on how to add visual flourishes. (Proprietary impositions consist solely of a small watermark at the lower right corner of the map.) Geocoded raster graphic layers (e.g. historical maps) can be integrated with relative ease.

Drawbacks

Leaflet is less a “tool” than a “toolbox”: it offers the building-blocks for basic functionality, but offers no means for creating or processing geocoded data shapefiles. Digital humanists who choose to use Leaflet for their projects will thus have to process their data using a different tool. Furthermore, all geospatial data must be formatted as .json or else it will be incompatible with Leaflet. This may add a layer of time investment and complexity to the process of creating the map.

Leaflet is also one of the more technically challenging tools to implement. Building a Leaflet map requires a certain degree of comfort with Javascript, and implementing any but the most basic of interactive features requires even more technical expertise. While Leaflet is very well-documented, its tutorials are not tailored to the specific interactivity requirements of a humanist project, and projects external to Leaflet itself tend to document their technical adaptations much more poorly. The learning curve for Leaflet may prove prohibitively daunting for less technically-comfortable users.

Name: Leaflet

Governing Body: Vladimir Agafonkin (private individual)

Price: free (open-source)

Difficulty Level: 5 (Expert)

Best Disciplinary Fit:

  • art, architectural, and cultural history
  • literature and textual studies
  • collections outreach
  • social history

Website: http://www.leafletjs.com

  • No labels