85 KiB
layout | title | bodyclass |
---|---|---|
v2 | Plugins | plugins-page |
Leaflet Plugins
While Leaflet is meant to be as lightweight as possible, and focuses on a core set of features, an easy way to extend its functionality is to use third-party plugins. Thanks to the awesome community behind Leaflet, there are literally hundreds of nice plugins to choose from.
Tile & image layers
<ul>
<li> <a href='#basemap-providers'>Basemap providers</a></li>
<li> <a href='#basemap-formats'>Basemap formats</a></li>
<li> <a href='#non-map-base-layers'>Non-map base layers</a></li>
<li> <a href='#tileimage-display'>Tile/image display</a></li>
<li> <a href='#tile-load'>Tile load</a></li>
<li> <a href='#vector-tiles'>Vector tiles</a></li>
</ul>
<h4>Overlay data</h4>
<ul>
<li> <a href='#overlay-data-formats'>Overlay data formats</a></li>
<li> <a href='#dynamiccustom-data-loading'>Dynamic data loading</a></li>
<li> <a href='#synthetic-overlays'>Synthetic overlays</a></li>
<li> <a href='#data-providers'>Data providers</a></li>
</ul>
</div>
<div class="toc-col">
<h4>Overlay Display</h4>
<ul>
<li><a href="#markers--renderers">Markers & renderers</a></li>
<li><a href="#overlay-animations">Overlay animations</a></li>
<li><a href="#clusteringdecluttering">Clustering/decluttering</a></li>
<li><a href="#heatmaps">Heatmaps</a></li>
<li><a href="#dataviz">DataViz</a></li>
</ul>
<h4>Overlay interaction</h4>
<ul>
<li><a href="#edit-geometries">Edit geometries</a></li>
<li><a href="#time--elevation">Time & elevation</a></li>
<li><a href="#search--popups">Search & popups</a></li>
<li><a href="#areaoverlay-selection">Area/overlay selection</a></li>
</ul>
</div>
<div class="toc-col">
<h4>Map interaction</h4>
<ul>
<li><a href="#layer-switching-controls">Layer switching controls</a></li>
<li><a href="#interactive-panzoom">Interactive pan/zoom</a></li>
<li><a href="#bookmarked-panzoom">Bookmarked pan/zoom</a></li>
<li><a href="#fullscreen-controls">Fullscreen</a></li>
<li><a href="#minimaps--synced-maps">Minimaps & synced maps</a></li>
<li><a href="#measurement">Measurement</a></li>
<li><a href="#mouse-coordinates">Mouse coordinates</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#user-interface">User interface</a></li>
<li><a href="#printexport">Print/export</a></li>
<li><a href="#geolocation">Geolocation</a></li>
</ul>
</div>
<div class="toc-col">
<h4>Miscellaneous</h4>
<ul>
<li><a href="#geoprocessing">Geoprocessing</a></li>
<li><a href="#routing">Routing</a></li>
<li><a href="#geocoding">Geocoding</a></li>
<li><a href="#plugin-collections">Plugin collections</a></li>
</ul>
<h4>Integration</h4>
<ul>
<li><a href="#frameworks--build-systems">Frameworks & build systems</a></li>
<li><a href="#suprdsup-party-integration">3<sup>rd</sup> party</a></li>
</ul>
<hr>
<a href="#develop-your-own">Develop your own</a>
</div>
Tile & image layers
The following plugins allow loading different maps and provide functionality to tile and image layers.
Basemap providers
Ready-to-go basemaps, with little or no configuration at all.
Plugin | Description | Maintainer |
---|---|---|
leaflet-providers | Contains configurations for various free tile providers — OSM, OpenCycleMap, MapQuest, Stamen, Esri, etc. | leaflet-extras members |
Leaflet.KoreanTmsProviders | Contains configurations for various (South) Korean tile providers — Daum, Naver, VWorld, etc. | Seong Choi |
Leaflet.ChineseTmsProviders | Contains configurations for various Chinese tile providers — TianDiTu, MapABC, GaoDe, etc. | Tao Huang |
Esri Leaflet | A set of tools for using ArcGIS services with Leaflet. Support for map services, feature layers, ArcGIS Online tiles and more. | Patrick Arlt |
Leaflet.GIBS | NASA EOSDIS GIBS imagery integration. The plugin provides 96 daily updated layers with satellite imagery and science parameters. Demo. | Alexander Parshin |
L.TileLayer.Kartverket | Provides easy setup of the tile layers from Kartverket (The Norwegian Mapping Authority) | Kultur og naturreise / Atle Frenvik Sveen |
Leaflet.Spain.WMS | Provides easy setup for several Web Map Services (WMS) layers for Spain (PNOA, IGN base, Catastro, etc), from Spanish mapping agencies. | Patricio Soriano |
PolarMap.js | JavaScript library for displaying tiles from ArcticWebMap, a free tile provider with OSM data in multiple Arctic polar projections. Includes lower-level API for deeper integration with other Leaflet plugins. | GeoSensorWeb Lab |
Basemap formats
Plugins for loading basemaps or GIS raster layers in common (albeit non-default) formats.
Plugin | Description | Maintainer |
---|---|---|
leaflet.TileLayer.WMTS | Add WMTS (IGN) layering for leaflet. | Alexandre Melard |
azgs-leaflet | A set of small plugins for Leaflet, including WFS-GeoJSON layer with filtering, a hover control for GeoJSON, and an Esri tile layer. | AZGS |
leaflet.wms | Enhanced WMS support for Leaflet, including single-tile/untiled layers, shared WMS sources, and layer identify via GetFeatureInfo. |
S. Andrew Sheppard (HEI Geo) |
Leaflet.bpg | TileLayer with .bpg image format decoding. | Andrzej Zaborowski |
TileLayer.GeoJSON | A TileLayer for GeoJSON tiles. | Glen Robertson |
leaflet-tilejson | Adds support for the TileJSON specification to Leaflet. | Per Liedman, Kartena |
cartodb-leaflet | Official CartoDB plugin for Leaflet. | Vizzuality |
Leaflet-2gis | Adds support for 2GIS tile layer | Eugene Mikhalev |
Leaflet GeoJSON Encoded | Extends the L.GeoJSON layer using Google polyline encoding algorithm, allowing an optimized data transfer. | Geobricks |
Non-map base layers
Sometimes you don't want to load a map, just big custom images. Really big ones.
Plugin | Description | Maintainer |
---|---|---|
TileLayer.Zoomify | A TileLayer for Zoomify images. | Bjørn Sandvik |
TileLayer.DeepZoom | A TileLayer for DeepZoom images. | Al Farisi, Indokreatif Teknologi |
TileLayer.Gigapan | A TileLayer for Gigapan images. | Dan Sherman |
Leaflet.TileLayer.IIP | Add support for IIPImage layers in Leaflet. | Emmanuel Bertin |
Leaflet-IIIF | A IIIF (International Image Interoperability Framework) viewer for Leaflet. See the demo. | Jack Reed |
Leaflet.MandelbrotGL | Renders the Mandelbrot set using WebGL (demo). | Iván Sánchez |
leaflet-fractal | Renders some fractals (Mandelbrot set, Julia set and some others) using 2D canvas (demo). | Alexander Parshin |
Tile/image display
The following plugins change the way that tile or image layers are displayed in the map.
Plugin | Description | Maintainer |
---|---|---|
TileLayer.BoundaryCanvas | Allows you to draw tile layers with arbitrary polygonal boundary. HTML5 Canvas is used for rendering. | Alexander Parshin |
TileLayer.Grayscale | A regular TileLayer with grayscale makeover. | Ilya Zverev |
Leaflet.ImageTransform | Add support of image overlays with arbitrary perspective transformation. | Alexander Parshin, Sergey Alekseev |
Leaflet.OpacityControls | Simple Leaflet controls to adjust the opacity of a map layer. | Jared Dominguez |
Leaflet.DistortableImage | Enable users to scale, rotate, and distort images on Leaflet maps. | Public Lab |
Leaflet.TileLayer.Mask | A TileLayer with mask effect (demo) | Yuzo Matsuzawa |
Tile Load
The following plugins change the way that tile layers are loaded into the map.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.MultiTileLayer | Allows to compose a TileLayer from several tile sources. Each source is active only on a defined set of zoomlevels. | Mattias Bengtsson |
Leaflet.FunctionalTileLayer | Allows you to define tile layer URLs using a function. Even works with asynchronous sources, using promises. | Ishmael Smyrnow |
TileLayer.Cordova | For use with Cordova/Phonegap, adds tile caching onto local device storage, switching between offline and online mode. | Greg Allensworth |
TileLayer.PouchDBCached | Allows all Leaflet TileLayers to cache into PouchDB for offline use. | Iván Sánchez Ortega, MazeMap |
Leaflet.loading | A simple control that adds a loading indicator as tiles and other data are loaded. | Eric Brelsford |
Vector tiles
Plugins to display vector tiles.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.MapboxVectorTile | A Leaflet Plugin that renders Mapbox Vector Tiles on canvas. See demo | SpatialDev |
Hoverboard | Render vector tiles on canvas with leaflet (geojson, topojson, and protobuf). See demo. | Tristan Davies |
geojson-vt | Efficient library for slicing GeoJSON data into vector tiles on the fly. | Mapbox |
Overlay data
The following plugins provide new ways of loading overlay data (GIS vector data): points, lines and polygons.
Overlay data formats
Load your own data from various GIS formats.
Plugin | Description | Maintainer |
---|---|---|
leaflet-omnivore | Loads & converts CSV, KML, GPX, TopoJSON, WKT formats for Leaflet. | Mapbox |
Leaflet.FileLayer | Loads files (GeoJSON, GPX, KML) into the map using the HTML5 FileReader API (i.e. locally without server). | Mathieu Leplatre |
Leaflet.geoCSV | Leaflet plugin for loading a CSV file as geoJSON layer. | Iván Eixarch |
Leaflet.Shapefile | Put a shapefile onto your map as a layer. | Calvin Metcalf |
Leaflet.FileGDB | Put an ESRI File GeoDatabase onto your map as a layer. | Calvin Metcalf |
Leaflet.encoded | Use encoded polylines in Leaflet. | Jieter |
Leaflet GPX | GPX layer, targeted at sporting activities by providing access to information such as distance, moving time, pace, elevation, heart rate, etc. | Maxime Petazzoni |
Wicket | A modest library for translating between Well-Known Text (WKT) and Leaflet geometry objects (e.g. between L.marker() instances and "POINT()" strings). | K. Arthur Endsley |
QGIS2Leaf | QGIS2Leaf exports the vector layers in QGIS as GeoJSON and creates a basic Leaflet webmap from it. Additionally your raster data is added as image overlays with an opacity slider. | Geolicious |
Leaflet-WFST | WFS client layer with transaction support | Flexberry |
Dynamic/custom data loading
Load dynamic data which is updated in the map, or load GIS vector data in non-standard ways.
Plugin | Description | Maintainer |
---|---|---|
Leaflet Realtime | Put realtime data on a Leaflet map: live tracking GPS units, sensor data or just about anything. | Per Liedman |
Leaflet Ajax | Add GeoJSON data via ajax or jsonp. | Calvin Metcalf |
Leaflet.Liveupdate | Periodically ('live') update something on a map (Demo) | Martijn Grendelman |
Leaflet.Pouch | Use PouchDB to sync CouchDB data to local storage (indexedDB), to just add couchDB data or as just a less confusing implementation of indexedDB. | Calvin Metcalf |
Leaflet.Indoor | Create indoor maps. | Christopher Baines |
Synthetic overlays
These plugins create useful overlays from scratch, no loading required.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.Graticule | Draws a grid of latitude and longitude lines. | Bjørn Sandvik |
Leaflet.SimpleGraticule | Draws a grid lines for L.CRS.Simple coordinate system. | Andrew Blakey |
Leaflet.Terminator | Overlay day and night regions on a map. | Jörg Dietrich |
Data providers
Load overlay data from third-party-services. See also basemap providers and plugin collections.
Plugin | Description | Maintainer |
---|---|---|
Leaflet Vector Layers | Allows to easily create vector layers from a number of geo web services, such as ArcGIS Server, Arc2Earth, GeoIQ, CartoDB and GIS Cloud. | Jason Sanford |
Leaflet Layer Overpass | Easily include data from the overpass api. | kartenkarsten |
Leaflet.dbpediaLayer | A layer with Points of interest from Wikipedia - loaded via ajax from DBpedia's SPARQL endpoint. | Kr1 |
Overlay display
The following plugins provide new ways of displaying overlay data information.
Markers & renderers
These plugins provide new markers or news ways of converting abstract data into images in your screen. Leaflet users versed in GIS also know these as symbolizers.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.ellipse | Leaflet.ellipse place ellipses on map by specifying center point, semi-major axis, semi-minor axis, and tilt degrees from west. | JD Fergason |
Leaflet.label | Adds text labels to map markers and vector layers. | Jacob Toye |
Leaflet-semicircle |
Adds functionality to L.Circle to draw semicircles.
| Jieter |
Leaflet.PolylineDecorator | Allows you to draw patterns (like dashes, arrows or evenly spaced Markers) along Polylines or coordinate paths. | Benjamin Becquet |
Leaflet.Sprite | Use sprite based icons in your markers. | Calvin Metcalf |
Leaflet.TextPath | Allows you to draw text along Polylines. | Mathieu Leplatre |
Leaflet.Awesome-Markers | Colorful, iconic & retina-proof markers based on the Font Awesome icons/Twitter Bootstrap icons | Lennard Voogdt |
Leaflet.Extra-Markers | Shameless copy of Awesome-Markers with more shapes, colors and semantic-ui support | Cory Silva |
Leaflet.MakiMarkers | Create markers using Maki Icons from MapBox. | James Seppi |
Leaflet.LineExtremities | Show symbols at the extremities of polylines, using SVG markers. | Frédéric Bonifas |
Leaflet.VectorMarkers | Vector SVG markers for Leaflet, with an option for Font Awesome/Twitter Bootstrap icons. | Mathias Schneider |
Leaflet.pattern | Add support for pattern fills on Paths. | Tyler Eastman |
Leaflet.BoatMarker | A boat marker using HTML Canvas for displaying yachts and sailboats with heading and wind information. Demo. | Thomas Brüggemann |
leaflet-usermarker | Plugin for plotting a marker representing a user - or multiple users - on a map, with support for drawing an accuraccy circle. Can be seen in action on Longitude.me. | Jonatan Heyman |
Leaflet.geojsonCSS | Geojson CSS implementation for Leaflet. | Alexander Burtsev |
OSM Buildings | Amazing JS library for visualizing 3D OSM building geometry on top of Leaflet. | Jan Marsch |
Leaflet.EdgeMarker | Plugin to indicate the existence of Features outside of the current view. | Gerald Pape |
Leaflet.orientedMarker | Allows to manage orientation of markers dynamically. | Gismartwaredev |
leaflet-icon-pulse | Renders pulsing icon using CSS3. It can be used for location marker. | mapshakers/ Filip Zavadil |
leaflet-mapkey-icon | Set of cartographic font icons based on mapkeyicons. | mapshakers/ Filip Zavadil |
Leaflet.curve | A Leaflet plugin for drawing Bézier curves and other complex shapes. Demo. | elfalem |
Leaflet.Arc | This plugin adds L.Polyline.Arc function which wraps arc.js functionality for creation of Great Cirlce arcs. | Alexey Gusev |
Overlay animations
These plugins animate markers or some geometries. See also geometries with time or elevation.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.AnimatedMarker | Animate a marker along a polyline. | Aaron Ogle |
Leaflet.BounceMarker | Make a marker bounce when you add it to a map. | Maxime Hadjinlian |
Leaflet.SmoothMarkerBouncing | Smooth animation of marker bouncing for Leaflet. | Alexei KLENIN |
Leaflet.MovingMarker | Allow to move markers along a polyline with custom durations. | Ewoken |
Leaflet.TransitionedIcon | Transition in/out markers with CSS3 transitions. It supports jitter for staggering markers into view to prevent visual overload. See the demo. | Brian Reavis |
Clustering/Decluttering
When you are displaying a lot of data, these plugins will make your map look cleaner.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.markercluster | Beautiful, sophisticated, high performance marker clustering solution with smooth animations and lots of great features. Recommended! | Dave Leaver |
Leaflet.LayerGroup.Collision | Provides collision detection for groups of markers. Unlike clustering, this takes into account the shape & size of the markers. | Iván Sánchez Ortega, MazeMap |
Overlapping Marker Spiderfier | Deals with overlapping markers in a Google Earth-inspired way by gracefully springing them apart on click. | George MacKerron |
PruneCluster | Fast and realtime marker clustering library. | Antoine Pultier |
Leaflet.Deflate | Deflates lines and polygons to a marker when their screen size becomes too small in lower zoom levels. | Oliver Roick |
Leaflet.GridCluster | Create grid-based clusters in realtime. | Andreas Kiefer |
q-cluster | Quick point clustering library with D3 categorization. | Nicholas Hallahan |
Leaflet.ConditionalLayer | A FeatureGroup that does not show any more than a certain amount of markers visible in the viewport. (Demo) | EPP |
Heatmaps
These plugins create heatmaps and heatmap-like visualizations from vector data.
Plugin | Description | Maintainer |
---|---|---|
MaskCanvas | Canvas layer that can be used to visualize coverage. | Dominik Moritz |
HeatCanvas | Simple heatmap api based on HTML5 canvas. | Sun Ning |
heatmap.js |
JavaScript Library for HTML5 canvas based heatmaps.
|
DataViz
Powerful multi-purpose libraries for data visualization.
Plugin | Description | Maintainer |
---|---|---|
RaphaelLayer | Allows you to use Raphael as a layer on a Leaflet map for advanced animations and visualizations. | Dynamic Methods |
Leaflet Data Visualization Framework | New markers, layers, and utility classes for easy thematic mapping and data visualization. | Scott Fairgrieve |
Leaflet.D3SvgOverlay | SVG overlay class for using with D3 library. Supports zoom animation and scaling without need to redraw the layer. | Kirill Zhuravlev |
mapbox-gl-leaflet | Binding from Mapbox GL JS to the Leaflet API | Tom MacWright |
Interaction with geometries/features
The following plugins enable users to interact with overlay data: edit geometries, select areas or features, interact with the time dimension, search features and display information about them.
Edit geometries
Allows users to create, draw, edit and/or delete points, lines and polygons.
<tr>
<td>
<a href="https://github.com/tkrajina/leaflet-editable-polyline">Leaflet.Editable.Polyline</a>
</td><td>Editable polylines: move existing points, add new points and split polylines.
</td><td>
<a href="https://github.com/tkrajina">Tomo Krajina</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/Leaflet/Leaflet.draw">Leaflet.draw</a>
</td><td>
Enables drawing features like polylines, polygons, rectangles, circles and markers through a very nice user-friendly interface with icons and hints. <em>Recommended!</em>
</td><td>
<a href="https://github.com/jacobtoye">Jacob Toye</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/kartena/Leaflet.EditableHandlers">Leaflet.EditableHandlers</a>
</td><td>
A set of plugins that includes circle editing, measuring tool, and label for polygon sides.
</td><td>
<a href="http://www.kartena.se/">Kartena</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/dwilhelm89/Leaflet.StyleEditor">Leaflet.StyleEditor</a>
</td><td>
Enables editing the styles of features (lines, polygons, etc) and markers with a GUI.
</td><td>
<a href="https://github.com/dwilhelm89">Dennis Wilhelm</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/jdomingu/Leaflet.SimpleMarkers">Leaflet.SimpleMarkers</a>
</td><td>
A light-weight Leaflet plugin for adding and deleting markers.
</td><td>
<a href="https://github.com/jdomingu">Jared Dominguez</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/yohanboniface/Leaflet.Editable">Leaflet.Editable</a>
</td><td>
Lightweight fully customisable and controlable drawing/editing plugin.
</td><td>
<a href="http://yohanboniface.me/">Yohan Boniface</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/w8r/Leaflet.Path.Drag">Leaflet.Path.Drag</a>
</td>
<td>
Drag handler and interaction for polygons and polylines (<a href="https://w8r.github.io/Leaflet.Path.Drag">Demo</a>)
</td>
<td>
<a href="https://github.com/w8r/">Alexander Milevski</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/makinacorpus/Leaflet.Snap">Leaflet.Snap</a>
</td><td>
Enables snapping of draggable markers to polylines and other layers.
</td><td>
<a href="https://github.com/leplatrem">Mathieu Leplatre</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/SINTEF-9012/Leaflet.MapPaint">Leaflet.MapPaint</a>
</td>
<td>
Bitmap painting plugin designed for touch devices.
</td><td>
<a href="https://github.com/yellowiscool">Antoine Pultier</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/yohanboniface/Leaflet.Storage">Leaflet.Storage</a>
</td><td>
Create/update/delete Map, Marker, Polygon, Polyline... and expose them for backend storage with an API.
</td><td>
<a href="http://yohanboniface.me/">Yohan Boniface</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/Wildhoney/L.Pather">Leaflet.Pather</a>
</td><td>
L.Pather is a freehand polyline creator that simplifies the polyline for mutability. Requires D3 support.
</td><td>
<a href="https://github.com/Wildhoney">Wildhoney</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/manleyjster/Leaflet.Illustrate">Leaflet.Illustrate</a>
</td><td>
Extension for Leaflet.draw enabling users to <a href="http://manleyjster.github.io/Leaflet.Illustrate/examples/0.0.2/simple/">type annotations directly on maps</a>.
</td><td>
<a href="https://github.com/manleyjster">Justin Manley</a>
</td>
</tr>
Plugin | Description | Maintainer |
---|---|---|
Leaflet.FreeDraw | Zoopla inspired freehand polygon creation using Leaflet.js and D3. | Wildhoney |
Leaflet.plotter | leaflet-plotter allows you to create routes using a leaflet powered map. You can click on the mid-points to create a new, draggable point. | Nathan Mahdavi |
Time & elevation
Most data is two-dimensional (latitude and longitude), but some data has more dimensions (altitude and/or time). The following plugins help users navigate these extra dimensions.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.TimeDimension | Add time dimension capabilities on a Leaflet map. Demos | ICTS SOCIB |
Leaflet Time-Slider | The Leaflet Time-Slider enables you to dynamically add and remove Markers on a map by using a JQuery UI slider | Dennis Wilhelm |
LeafletPlayback | Play back time-stamped GPS Tracks synchronized to a clock. | Nicholas Hallahan |
Leaflet.timeline | Display arbitrary GeoJSON on a map with a timeline slider and play button. | Jonathan Skeate |
Leaflet.Elevation | A Leaflet plugin to view interactive height profiles of GeoJSON lines using d3. | Felix Bache |
Leaflet.hotline | A Leaflet plugin for drawing gradients along polylines. | iosphere |
Search & popups
Plugins that search for overlays and enhance how to display information about them.
Plugin | Description | Maintainer |
---|---|---|
leaflet-fusesearch | A control that provides a panel to search features in a GeoJSON layer using the lightweight fuzzy search Fuse.js | Antoine Riche |
Leaflet Search | A control for search Markers/Features location by custom property in LayerGroup/GeoJSON. Support AJAX/JSONP, Autocompletion and 3rd party service | Stefano Cudini |
Leaflet.Rrose | A Leaflet Plugin for Edge Cases. For use when you want popups on mouseover, not click, and you need popup tips to reorient as you get close to the edges of your map. | Eric Theise |
Leaflet.utfgrid | Provides a utfgrid interaction handler for leaflet a very small footprint. | Dave Leaver |
Leaflet.RevealOSM | Very simple but extendable Leaflet plugin to display OSM POIs data on map click. | Yohan Boniface |
Area/overlay selection
These plugins help users select either overlays or areas in the map.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.AreaSelect | A fixed positioned, resizable rectangle for selecting an area on the map. | Jonatan Heyman |
leaflet-locationfilter | A draggable/resizable rectangle for selecting an area on the map. | Robert Kajic |
L.Control.LineStringSelect | Fast LineString(polyline) partial selection tool: select a stretch between two points in a complex path. Demo | Alexander Milevski |
Leaflet.FeatureSelect | Use a configurable centerpoint marker to select any geometry type from a GeoJSON layer. | Aaron Ogle |
Leaflet GeoJSON Selector | Leaflet Control for selection from GeoJSON feature in a interactive list and map(Demo). | Stefano Cudini |
Map interaction
New ways to interact with the map itself.
- Layer switching controls
- Interactive pan/zoom
- Bookmarked pan/zoom
- Fullscreen
- Minimaps & synced maps
- Measurement
- Mouse coordinates
- Events
- User interface
- Print/export
- Geolocation
Layer switching controls
The following plugins enhance or extend L.Control.Layers
.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.SelectLayers | a Leaflet plugin which adds new control to switch between different layers on the map. New control replaces L.Control.Layers radio button panel with select tag. | vogdb |
Leaflet.StyledLayerControl | A Leaflet plugin that implements the management and control of layers by organization into categories or groups. | Davi Custodio |
Leaflet.GroupedLayerControl | Leaflet layer control with support for grouping overlays together. | Ishmael Smyrnow |
Leaflet Control Order Layers | Adds the ability to change overlay order in the layers control. | Michael Salgado |
Leaflet Categorized Layers | Leaflet Control Layers extended for groups of categorized layers | Robbie Trencheny |
Leaflet Panel Layers | Leaflet Control Layers extended for group of layers and icons legend | Stefano Cudini |
Leaflet.UniformControl | Leaflet layer control with stylable checkboxes and radio buttons. | Chris Calip |
Leaflet-IconLayers | Leaflet control that displays base layers as small icons (demo). | Alexander Zverev |
Interactive pan/zoom
Change the way the user can interactively move around the map.
<tr>
<td>
<a href="https://github.com/slara/Leaflet.BorderPan">Leaflet.BorderPan</a>
</td><td>
A Leaflet plugin to pan by clicking on map borders.
</td><td>
<a href="https://github.com/slara">Sebastián Lara</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/SINTEF-9012/Leaflet.GameController">Leaflet GameController</a>
</td><td>
Interaction handler providing support for gamepads.
</td><td>
<a href="https://github.com/yellowiscool">Antoine Pultier</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/aratcliffe/Leaflet.twofingerzoom">Leaflet.twofingerZoom</a>
</td><td>
Interaction handler for touch devices enabling zooming out with a two finger tap.
</td><td>
<a href="https://github.com/aratcliffe/">Adam Ratcliffe</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/consbio/Leaflet.ZoomBox">Leaflet.ZoomBox</a>
</td>
<td>
A lightweight zoom box control: draw a box around the area you want to zoom to. <a href="https://consbio.github.io/Leaflet.ZoomBox">Demo</a>
</td>
<td>
<a href="https://github.com/brendan-ward">Brendan Ward</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/Zverik/Leaflet.LimitZoom">Leaflet LimitZoom</a>
</td><td>
Plugins to limit available zoom levels to a given list, either by
restricting zooming or by interpolating tiles.
</td><td>
<a href="https://github.com/zverik">Ilya Zverev</a>
</td>
</tr>
Plugin | Description | Maintainer |
---|---|---|
Leaflet.Pancontrol | A simple panning control. | Kartena |
Leaflet.BoxZoom | A visible, clickable control to perform a box zoom. | Greg Allensworth |
Leaflet.zoomslider | A zoom slider control. | Kartena |
Bookmarked pan/zoom
Change the way the user is moved around the map, by jumping to predefined/stored places.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.viewcenter | A simple control that adds a button to change view and zoom to predefinied values in options. | Dariusz Pawlak |
leaflet-zoom-min | Adds a button to the zoom control that allows you to zoom to the map minimum zoom level in a single click. | Alan Shaw |
Leaflet Navigation Toolbar | Leaflet control for simple back, forward and home navigation. | David C |
Leaflet Locationlist | A control to jump between predefined locations and zooms. | Ivan Ignatyev |
Leaflet.defaultextent | A control that returns to the original start extent of the map. Similar to the HomeButton widget. | Alex Nguyen |
Leaflet.Bookmarks | Control for adding and navigating between user-created bookmarks on the map. | Alexander Milevski |
Leaflet.ShowAll | A control that can show a predefined extent while saving the current one so it can be jumped back to. | Mor Yariv |
Leaflet.zoomhome | Zoom control with a home button for resetting the view (Demo) | Florian Brucker |
Leaflet-History | Track history of map movements and zoom locations similar to a browser. | Chris Scott |
Leaflet.RestoreView | Stores and restores map view using localStorage. | Mathieu Leplatre |
leaflet-hash | Plugin for persisting map state and browsing history through the URL hash. | Michael Lawrence Evans |
Fullscreen controls
Allows display of the map in full-screen mode.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.fullscreen | A fullscreen button control by mapbox | mapbox |
leaflet.fullscreen | Another fullscreen button control but for modern browsers, using HTML5 Fullscreen API. | Bruno B |
leaflet.zoomfs | A fullscreen button control. | Eli Dupuis |
Minimaps & synced maps
Display two maps at once. One of them might be a different size and zoom level, usable as a minimap to aid with navigation.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.Sync | Synchronized view of two maps. | Bjørn Sandvik |
Leaflet.MiniMap | A small minimap showing the map at a different scale to aid navigation. | Robert Nordan |
Leaflet.MagnifyingGlass | Allows you to display a small portion of the map at another zoom level, either at a fixed position or linked to the mouse movement, for a magnifying glass effect. | Benjamin Becquet |
Leaflet.layerscontrol-minimap | Extends the default Leaflet layers control with synced minimaps. | Jieter |
Measurement
Allow the user to measure distances or areas.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.MeasureControl | A simple tool to measure distances on maps (*relies on Leaflet.Draw*). | Makina Corpus |
Leaflet.MeasureAreaControl | Control for measuring element's area. | Ondrej Zvara |
leaflet-measure | Coordinate, linear, and area measure control for Leaflet maps | LJA GIS |
leaflet-graphicscale | Animated graphic scale control (demo). | Erik Escoffier |
Mouse coordinates
Show the geographical coordinates under the mouse cursor in different ways.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.MousePosition | A simple MousePosition control that displays geographic coordinates of the mouse pointer, as it is moved about the map | Ardhi Lukianto |
Leaflet.Coordinates | A simple Leaflet plugin viewing the mouse LatLng-coordinates. Also views a marker with coordinate popup on userinput. | Felix Bache |
Leaflet Coordinates Control | Captures mouseclick and displays its coordinates with easy way to copy them. | Michal Zimmermann |
Leaflet.NACCoordinates | Displays NAC coordinate of the mouse pointer on mouse move (Demo) | Mahmood Dehghan |
Leaflet.mouseCoordinates |
Displays the Mouse Coordinate in a Box.
Multiple Formats Are Possible
|
Johannes Rudolph |
Leaflet Location Picker | Simple location picker with mini Leaflet map (Demo) | Stefano Cudini |
Events
These plugins extend Leaflet event handling.
Plugin | Description | Maintainer |
---|---|---|
L.Sleep | Avoid unwanted scroll capturing. Demo | atstp |
Leaflet.OverIntent | Adds a new event ``mouseintent``, that differs from ``mouseover`` since it reflects user intentions to aim a particular layer. | Mathieu Leplatre |
Leaflet.AlmostOver | Trigger mouse events when cursor is "almost" over a layer. | Mathieu Leplatre |
Leaflet-active-area | This plugin allows you to use a smaller portion of the map as an active area. All positioning methods (setView, fitBounds, setZoom) will be applied on this portion instead of the all map. | Mappy |
Leaflet.ControlledBounds | Inspired by Leaflet-active-area, automatically detects the largest area of the map not covered by any map controls and applies setView, fitBounds, setZoom, getBounds to that area. | Iván Sánchez Ortega, MazeMap |
singleclick |
Extend L.Map to fire a singleclick event (demo). Compatible with Leaflet 0.7.x only.
|
Guillaume Lathoud |
singleclick |
Extend L.Evented to fire a singleclick event (demo). Compatible with Leaflet 1.0.0-beta1 and greater only.
| Iván Sánchez Ortega, MazeMap |
User interface
Buttons, sliders, toolbars, sidebars, and panels.
Plugin | Description | Maintainer |
---|---|---|
L.EasyButton | In one line, add a Font Awesome control button with attached click events. Demo | atstp |
Leaflet.contextmenu | A context menu for Leaflet. | Adam Ratcliffe |
leaflet-sidebar | A responsive sidebar plugin. | Tobias Bieniek |
sidebar-v2 | Another responsive sidebar plugin. This time with tabs! | Tobias Bieniek |
Leaflet.Messagebox | Display a temporary text message on a map (Demo) | Martijn Grendelman |
Leaflet.TileLegend | Create illustrated and interactive legends for your background layers. | Yohan Boniface |
Leaflet.toolbar | Flexible, extensible toolbars for Leaflet maps. View an example here. | Justin Manley |
L.Credits | A simple, attractive, interactive control to put your logo and link in the corner of your map. | Greg Allensworth |
Leaflet.Spin | Shows a nice spinner on the map using Spin.js, for asynchronous data load, like with Leaflet Ajax. | Mathieu Leplatre |
Leaflet Weather | A Leaflet plugin for adding a weather widget to the map using OpenWeatherMap API (Demo). | Osk |
Leaflet ResizableControl | A Leaflet plugin to add a resizable and scrollable control to the map (Demo). | David Albrecht |
Leaflet.Slider |
Adds a <input type="range"> slider that calls a function every time its input is changed (Demo)
|
EPP |
leaflet-control-window | Creates modal/modeless, draggable, responsive, customisable window in your map. | mapshakers/ Filip Zavadil |
Print/export
Print or export your map.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.print | Implements the Mapfish print protocol allowing a Leaflet map to be printed using either the Mapfish or GeoServer print module. | Adam Ratcliffe |
Leaflet-image | Export images out of Leaflet maps without a server component, by using Canvas and CORS. | Tom MacWright |
Geolocation
Plugins that extend Leaflet's geolocation capabilities.
Plugin | Description | Maintainer |
---|---|---|
L.LocationShare | Allow users to send and receive a marker with a message. Demo | atstp |
Leaflet.Locate | A customizable locate control. | Dominik Moritz |
Leaflet Control Compass | A leaflet control plugin to build a simple rotating compass | Stefano Cudini |
Leaflet.AccuratePosition | Leaflet.AccuratePosition aims to provide a desired device location accuracy. | Michael Schmidt-Voigt |
Miscellaneous
Geoprocessing
The following plugins perform several sorts of geoprocessing (mathematical and topological operations on points, lines and polygons).
Plugin | Description | Maintainer |
---|---|---|
Proj4Leaflet | Proj4js integration plugin, allowing you to use all kinds of weird projections in Leaflet. | Kartena |
arc.js | A JS library for drawing great circle routes that can be used with Leaflet. | Dane Springmeyer |
Leaflet-pip | Simple point in polygon calculation using point-in-polygon. | Tom MacWright |
Leaflet.GeometryUtil | A collection of utilities for Leaflet geometries (linear referencing, etc.) | Benjamin Becquet, Mathieu Leplatre |
Greiner-Hormann | Greiner-Hormann algorithm for polygon clipping and binary operations, adapted for use with Leaflet. | Alexander Milevski |
Leaflet.Geodesic | Draw geodesic (poly)lines. A geodesic line is the shortest path between two given positions on the earth surface. and You can also calculate the exact distance between two given points on the map. | Henry Thasler |
Leaflet.buffer | Enables buffering of shapes drawn with Leaflet.draw. | Jonathan Skeate |
Leaflet.LayerIndex | An efficient spatial index for features and layers, using RTree.js. | Mathieu Leplatre |
leaflet-spatial-prefix-tree | Leaflet plugin for visualizing spatial prefix trees, quadtree and geohash. See demo | Mapzen |
Routing
The following plugins use external services to calculate driving or walking routes.
<tr>
<td>
<a href="https://github.com/StephanGeorg/leaflet-routeboxer">Leaflet RouteBoxer</a>
</td><td>
This is a Leaflet implementation of the RouteBoxer Class from Google. The Leaflet RouteBoxer class generates a set of L.LatLngBounds objects that are guaranteed to cover every point within a specified distance of a path.
</td><td>
<a href="http://www.nearest.place/">Nearest!</a>
</td>
</tr>
Plugin | Description | Maintainer |
---|---|---|
Leaflet Routing Machine | Control for route search with via points, displaying itinerary and alternative routes. Uses OSRM by default, but also supports GraphHopper, Mapbox Directions API and more. | Per Liedman |
Leaflet.Routing | Leaflet controller and interface for routing paths between waypoints using any user provided routing service. | Norwegian Trekking Association |
Route360° | Route360° visualizes the area which is reachable from a set of starting points in a given time and gives detailed routing information (walk, bike, car and public transportation) to targets. | Motion Intelligence GmbH |
Geocoding
External services that transform an address or the name of a place into latitude and longitude (or vice versa).
Plugin | Description | Maintainer |
---|---|---|
Leaflet GeoSearch |
Small geocoding plugin that brings address searching/lookup (aka geosearching) to Leaflet. Comes with support for Google, OpenStreetMap Nominatim, Bing, Esri and Nokia. Easily extensible. | Stephan Meijer |
Leaflet Control OSM Geocoder | A simple geocoder that uses OpenstreetMap Nominatim to locate places by address. | Karsten Hinz |
Leaflet Control Bing Geocoder | A simple geocoder control that uses Bing to locate places. | Samuel Piquet |
Leaflet Control Geocoder | A clean and extensible control for both geocoding and reverse geocoding. Builtin support for Nominatim, Bing, MapQuest, Mapbox, What3Words, Google and Photon. Easy to extend to other providers. | Per Liedman |
Leaflet GeoIP Locator | A simple plugin that allows finding the approximate location of IP addresses and map centering on said location. | Jakub Dostal |
Esri Leaflet Geocoder | A geocoding control with suggestions powered by the ArcGIS Online geocoder. | Patrick Arlt |
Leaflet.OpenCage.Search | A search plugin plugin that uses OpenCage Data's geocoding API. | The OpenCage team |
Leaflet.Geonames | A lightweight geocoding control powered by GeoNames. Demo | Brendan Ward |
Plugin collections
Sets of plugins that span several categories.
Plugin developers: please keep future plugins in individual repositories.
Plugin | Description | Maintainer |
---|---|---|
Plugins by Pavel Shramov | A set of plugins for: GPX, KML layers; Bing tile layer; Google and Yandex layers (implemented with their APIs), permalink and distance measurement controls. | Pavel Shramov, Bruno B |
Spectrum4Leaflet | Tools for using Spectrum Spatial Server services with leaflet. This plugin supports: map service, tile service, feature service. It has layers, legend and feature controls. | SVoyt, ESTI MAP |
MapBBCode-related leaflet plugins | Seven plugins for various features, independent of the MapBBCode library. From circular and popup icons to buttons, layer switcher, better search and attribution. | Ilya Zverev |
Integration
Frameworks & build systems
Ease your development integrating Leaflet into a development framework or automating some of the javascript/CSS work for complex applications.
<tr>
<td>
<a href="https://github.com/prtksxna/leaflet-map-component">Leaflet map component</a>
</td>
<td>
Integrate Leaflet in applications made with the <a href='https://www.polymer-project.org/0.5/'>Polymer 0.5</a> web framework.
</td>
<td>
<a href="https://github.com/prtksxna">Prateek Saxena</a>
</td>
</tr>
Plugin | Description | Maintainer |
---|---|---|
Leaflet Yeoman Generator | Yeoman generator that scaffolds out a basic Leaflet map application. | Moritz Klack |
react-leaflet | React components for Leaflet maps. | Paul Le Cam |
Leaflet.CSS | Add the main Leaflet CSS files (or any css) from within JavaScript, be gone conditional comments. | Calvin Metcalf |
Leaflet LayerConfig | Provide a json file or service response with a configuration of layers and markers to automatically set up a Leaflet client. | Alexander Nossum |
Leaflet.i18n | Internationalization for Leaflet plugins. | Yohan Boniface |
Leaflet ZoomLevel CSS Class | Add zoom level css class to map element for easy style updates based on zoom levels | Dag Jomar Mersland |
famous-map | Integrate Leaflet in applications made with the famo.us web framework. | Hein Rutjes |
Angular Leaflet directive | Integrate Leaflet in applications made with the AngularJS web framework. | David Rubert |
<leaflet-map> | Integrate Leaflet in applications made with the Polymer >= 1.0 web component framework. | Hendrik Brummermann, Prateek Saxena |
3rd party integration
The following plugins integrate Leaflet into third party services or websites.
Plugin | Description | Maintainer |
---|---|---|
Leaflet.EditInOSM | Add a control with links to open the current map view on main OSM editors. | Yohan Boniface |
Maps Marker Pro | A WordPress plugin that enables users to pin, organize and share their favorite places and tracks through their WordPress powered site. | Robert Harm |
WordPress Leaflet Map | Interactive and flexible shortcode to create multiple maps in posts and pages, and to add multiple markers on those maps. | Benjamin J DeLong |
Maptiks | Analytics platform for web maps. Track map activities, layer load times, marker clicks, and more! | Sparkgeo |
Develop your own
Leaflet keeps it simple. If you can think of a feature that is not required by all of Leaflet users, and you can write the javascript code in a reusable way, you've got yourself a Leaflet plugin already.
There are no hard requirements on how to create your own plugin, but all developers are encouraged to read the recommendations in the plugin guide.
Once your plugin is ready, you can submit it to this list: just send a pull request with the addition to Leaflet repo's gh-pages branch (plugins.md
file).