Controls & Interaction

Leaflet is designed to be as lightweight as possible and focuses on a core set of features. You can extend its functionality through third-party plugins. Here are several Leaflet plugins to choose from.

Plugin Description
Leaflet.AreaSelect A fixed positioned, resizable rectangle for selecting an area on the map.
Leaflet.draw Enables drawing features like polylines, polygons, rectangles, circles and markers through a very nice user-friendly interface with icons and hints. Recommended!
Leaflet.utfgrid Provides a utfgrid interaction handler for leaflet a very small footprint.
L.EasyButton In one line, add a Font Awesome control button with attached click events.
Leaflet.EditableHandlers A set of plugins that includes circle editing, measuring tool, and label for polygon sides.
L.LocationShare Allow users to send and receive a marker with a message.
Leaflet.Pancontrol A simple panning control.
Leaflet.zoomslider A zoom slider control.
Leaflet.Locate A customizable locate control.
Leaflet.fullscreen A fullscreen button control by mapbox
leaflet.zoomfs A fullscreen button control.
leaflet.fullscreen Another fullscreen button control but for modern browsers, using HTML5 Fullscreen API.
leaflet-search A control for search Markers/Features location by custom property in LayerGroup/GeoJSON. Support AJAX/JSONP, Autocompletion and 3rd party service
leaflet-fusesearch A control that provides a panel to search features in a GeoJSON layer using the lightweight fuzzy search Fuse.js
leaflet-locationfilter A draggable/resizable rectangle for selecting an area on the map.
Leaflet.MiniMap A small minimap showing the map at a different scale to aid navigation.
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.
Leaflet.EditInOSM Add a control with links to open the current map view on main OSM editors.
Leaflet.Spin Shows a nice spinner on the map using Spin.js, for asynchronous data load, like with Leaflet Ajax.
Leaflet.RestoreView Stores and restores map view using localStorage.
Leaflet.FileLayer Loads files (GeoJSON, GPX, KML) into the map using the HTML5 FileReader API (i.e. locally without server).
Leaflet.Snap Enables snapping of draggable markers to polylines and other layers.
Leaflet Time-Slider The Leaflet Time-Slider enables you to dynamically add and remove Markers on a map by using a JQuery UI slider
Leaflet.RevealOSM Very simple but extendable Leaflet plugin to display OSM POIs data on map click.
Leaflet.MousePosition A simple MousePosition control that displays geographic coordinates of the mouse pointer, as it is moved about the map
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.
Leaflet.Coordinates A simple Leaflet plugin viewing the mouse LatLng-coordinates. Also views a marker with coordinate popup on userinput.
Leaflet.Elevation A Leaflet plugin to view interactive height profiles of GeoJSON lines using d3.
Leaflet.Sync Synchronized view of two maps.
Leaflet.Grouped
LayerControl
Leaflet layer control with support for grouping overlays together.
Leaflet.BorderPan A Leaflet plugin to pan by clicking on map borders.
Leaflet.TileLegend Create illustrated and interactive legends for your background layers.
LeafletPlayback Play back time-stamped GPS Tracks synchronized to a clock.
Leaflet.loading A simple control that adds a loading indicator as tiles and other data are loaded.
Leaflet.viewcenter A simple control that adds a button to change view and zoom to predefinied values in options.
Leaflet.contextmenu A context menu for Leaflet.
Leaflet.MeasureControl A simple tool to measure distances on maps (*relies on Leaflet.Draw*).
Leaflet.OverIntent Adds a new event “mouseintent“, that differs from “mouseover“ since it reflects user
intentions to aim a particular layer.
Leaflet.AlmostOver Trigger mouse events when cursor is “almost” over a layer.
Leaflet Control Order
Layers
Adds the ability to change overlay order in the layers control.
Leaflet.layerscontrol-minimap Extends the default Leaflet layers control with synced minimaps.
leaflet-sidebar A responsive sidebar plugin.
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.
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.
Leaflet.OpacityControls Simple Leaflet controls to adjust the opacity of a map layer.
Leaflet.StyleEditor Enables editing the styles of features (lines, polygons, etc) and markers with a GUI.
Leaflet.UniformControl Leaflet layer control with stylable checkboxes and radio buttons.
Leaflet.SimpleMarkers A light-weight Leaflet plugin for adding and deleting markers.
Leaflet Panel Layers Leaflet Control Layers extended for group of layers and icons legend
Leaflet Categorized
Layers
Leaflet Control Layers extended for groups of categorized layers
Leaflet Navigation
Toolbar
Leaflet control for simple back, forward and home navigation.
Leaflet LimitZoom Plugins to limit available zoom levels to a given list, either by restricting zooming or by interpolating tiles.
Leaflet Coordinates
Control
Captures mouseclick and displays its coordinates with easy way to copy them.
Leaflet GameController Interaction handler providing support for gamepads.
Leaflet.MeasureArea
Control
Control for measuring element’s area.
Leaflet.twofingerZoom Interaction handler for touch devices enabling zooming out with a two finger tap.
Leaflet Control Compass A leaflet control plugin to build a simple rotating compass
Leaflet.Editable Lightweight fully customisable and controlable drawing/editing plugin.
Leaflet.AccuratePosition Leaflet.AccuratePosition aims to provide a desired device location accuracy.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.