This article was accepted into the corpus but its outbound wikilinks were never NER-processed — typical at the deepest BFS hop or when the run's entity cap was reached. No expansion funnel to show.
| Leaflet (JavaScript library) | |
|---|---|
| Name | Leaflet |
| Author | Vladimir Agafonkin |
| Developer | Vladimir Agafonkin |
| Released | 2011 |
| Programming language | JavaScript |
| Operating system | Cross-platform |
| Platform | Web browsers |
| Genre | Web mapping library |
| License | BSD-2-Clause |
Leaflet (JavaScript library) is a lightweight open-source JavaScript library for interactive maps in web browsers. It provides a minimal, extensible core for rendering tiled maps and overlays, integrating with mapping services and geospatial data formats while emphasizing performance and simplicity. Leaflet is widely used across web applications, mobile sites, and geographic information systems by combining a small footprint with a plugin-oriented ecosystem.
Leaflet was created to offer an alternative to heavier mapping frameworks and to complement mapping services such as OpenStreetMap, Mapbox, Google Maps, Bing Maps, and HERE Technologies. It supports raster tiles from providers like Thunderforest, CartoDB, and Stamen, as well as vector layers compatible with standards from the Open Geospatial Consortium and formats like GeoJSON, KML, and TopoJSON. Developers and organizations including GitHub, Mozilla, Wikimedia Foundation, and academic projects use Leaflet to build interactive maps for web portals, dashboards, and mobile-friendly interfaces.
Leaflet offers core features such as tiled map layers, markers, popups, polylines, polygons, and control widgets for zooming and attribution. It implements event handling for mouse and touch interactions, supporting gestures on devices like iPhone and Google Nexus series. Projection handling integrates common schemes such as Web Mercator used by EPSG:3857 and coordinate systems referenced in datasets from institutions like the National Aeronautics and Space Administration and the European Space Agency. Accessibility and internationalization have been addressed in projects implementing Leaflet in contexts for United Nations mapping and humanitarian mapping by groups like Humanitarian OpenStreetMap Team.
Leaflet's architecture centers on a core map object that composes layers, controls, and handlers; it follows modular design principles similar to libraries like jQuery and React for extensibility. The API exposes methods for map instantiation, layer management, view manipulation, and event binding, aligning with web standards defined by WHATWG and browser engines such as Blink and Gecko. Internally, Leaflet manages DOM elements, Canvas and SVG rendering paths, and tile loading strategies comparable to approaches used in Cesium (software) and OpenLayers while maintaining a small gzipped size to optimize delivery on content delivery networks used by Cloudflare and Akamai.
A large plugin ecosystem extends Leaflet for clustering, heatmaps, routing, and vector tiles; notable plugins provide functionality analogous to services from Mapzen (historical), GraphHopper, OSRM, and Leaflet.markercluster. Integrations exist for frameworks and tools such as AngularJS, Vue.js, React Native, Django, and Ruby on Rails. Community-driven plugins enable compatibility with formats and services like Cesium, Turf.js, Protobuf, and MapLibre GL Native, supporting use cases in projects by organizations such as Esri and research groups at universities like Stanford University and Imperial College London.
Typical usage involves creating a map container, adding a tile layer from providers like Mapbox or OpenStreetMap, and placing markers or GeoJSON overlays produced by tools such as QGIS or ArcGIS. Examples in tutorials from Mozilla Developer Network, educational resources in courses at Massachusetts Institute of Technology, and developer blogs from companies like DigitalOcean demonstrate interactive choropleth maps, route visualizations with OpenRouteService, and real-time tracking with WebSocket feeds used by transit agencies like Transport for London. Code samples often combine Leaflet with libraries such as D3.js for data-driven styling and Bootstrap for UI controls.
Leaflet is optimized for responsiveness on desktop and mobile but has limitations when handling very large vector datasets or 3D visualizations; alternatives like Cesium (software) or Mapbox GL JS may be preferred for globe rendering or heavy vector-tile styling. Performance strategies in Leaflet projects include tile caching via CDNs operated by Fastly and Amazon CloudFront, marker clustering, Canvas rendering fallbacks, and server-side tiling pipelines using tools like Mapnik and TileServer GL. Memory and CPU constraints appear on devices with older browsers such as legacy versions of Internet Explorer or low-power hardware like early Raspberry Pi models.
Leaflet was initially authored by Vladimir Agafonkin and released in 2011; its development has been influenced by earlier mapping projects including OpenLayers and commercial efforts from Google. Over time contributions from volunteer developers on platforms like GitLab and GitHub expanded features, documentation, and translations used by internationalization projects from organizations like UNICEF and Red Cross. Major milestones include adoption by Wikimedia projects, compatibility updates for modern browsers maintained by W3C recommendations, and ecosystem growth driven by map designers associated with studios such as Stamen Design.
Leaflet is distributed under the permissive BSD-2-Clause license, facilitating incorporation into commercial offerings by companies including Mapbox, Esri, and startups in the geospatial sector. Its adoption spans governmental agencies, non-profits, academic institutions, and tech companies such as Twitter and Airbnb that embed maps in web interfaces. Training and certification resources referencing Leaflet appear in curricula at institutions like University of California, Berkeley and professional workshops by organizations such as OSGeo.
Category:JavaScript libraries Category:Web mapping