leaflet地图库

an open-source JavaScript library
for mobile-friendly interactive maps

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

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.

PluginDescriptionMaintainer
leaflet-providersContains configurations for various free tile providers — OSM, OpenCycleMap, MapQuest, Stamen, Esri, etc.leaflet-extras members
Leaflet.KoreanTmsProvidersContains configurations for various (South) Korean tile providers — Daum, Naver, VWorld, etc.Seong Choi
Leaflet.ChineseTmsProvidersContains configurations for various Chinese tile providers — TianDiTu, MapABC, GaoDe, etc.Tao Huang
Esri LeafletA set of tools for using ArcGIS services with Leaflet. Support for map services, feature layers, ArcGIS Online tiles and more.Patrick Arlt
Leaflet.GIBSNASA EOSDIS GIBS imagery integration. The plugin provides 96 daily updated layers with satellite imagery and science parameters. Demo.Alexander Parshin
L.TileLayer.KartverketProvides easy setup of the tile layers from Kartverket (The Norwegian Mapping Authority)Kultur og naturreise / Atle Frenvik Sveen
Leaflet.Spain.WMSProvides easy setup for several Web Map Services (WMS) layers for Spain (PNOA, IGN base, Catastro, etc), from Spanish mapping agencies.Patricio Soriano
PolarMap.jsJavaScript 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
Bing Maps LayerAdd Bing Maps tiles to your Leaflet Map. Requires Leaflet v1.0.0.beta.2 or later.Gregor MacLennan
L.TileLayer.HEREDisplays map tiles from HERE maps (demo).Iván Sánchez
L.GridLayer.GoogleMutantDisplays Google maps (with minimal artifacts thanks to a DOM mutation observer technique) (demo).Iván Sánchez

Basemap formats

Plugins for loading basemaps or GIS raster layers in common (albeit non-default) formats.

PluginDescriptionMaintainer
leaflet.TileLayer.WMTSAdd WMTS (IGN) layering for leaflet.Alexandre Melard
azgs-leafletA set of small plugins for Leaflet, including WFS-GeoJSON layer with filtering, a hover control for GeoJSON, and an Esri tile layer.AZGS
leaflet.wmsEnhanced WMS support for Leaflet, including single-tile/untiled layers, shared WMS sources, and layer identify via GetFeatureInfo.S. Andrew Sheppard
(HEI Geo)
Leaflet.bpgTileLayer with .bpg image format decoding.Andrzej Zaborowski
TileLayer.GeoJSONA TileLayer for GeoJSON tiles.Glen Robertson
leaflet-tilejsonAdds support for the TileJSON specification to Leaflet.Per LiedmanKartena
cartodb-leafletOfficial CartoDB plugin for Leaflet.Vizzuality
Leaflet-2gisAdds support for 2GIS tile layerEugene Mikhalev
Leaflet GeoJSON EncodedExtends 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.

PluginDescriptionMaintainer
TileLayer.ZoomifyA TileLayer for Zoomify images.Bjørn Sandvik
TileLayer.DeepZoomA TileLayer for DeepZoom images.Al Farisi,Indokreatif Teknologi
TileLayer.GigapanA TileLayer for Gigapan images.Dan Sherman
Leaflet.TileLayer.IIPAdd support for IIPImage layers in Leaflet.Emmanuel Bertin
Leaflet-IIIFIIIF (International Image Interoperability Framework) viewer for Leaflet. See the demo.Jack Reed
Leaflet.MandelbrotGLRenders the Mandelbrot set using WebGL (demo).Iván Sánchez
leaflet-fractalRenders 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.

PluginDescriptionMaintainer
TileLayer.BoundaryCanvasAllows you to draw tile layers with arbitrary polygonal boundary. HTML5 Canvas is used for rendering.Alexander Parshin
TileLayer.GrayscaleA regular TileLayer with grayscale makeover.Ilya Zverev
Leaflet.ImageTransformAdd support of image overlays with arbitrary perspective transformation.Alexander Parshin,Sergey Alekseev
Leaflet.OpacityControlsSimple Leaflet controls to adjust the opacity of a map layer.Jared Dominguez
Leaflet.DistortableImageEnable users to scale, rotate, and distort images on Leaflet maps.Public Lab
Leaflet.ImageOverlay.RotateDisplays rotated, scaled and skewed (but not rubbersheeted) ImageOverlays, given three control points. (demo).Iván Sánchez Ortega
Leaflet.TileLayer.MaskA TileLayer with mask effect (demo)Yuzo Matsuzawa
Leaflet.TileLayer.PixelFilterA TileLayer which can filter and replace pixels by RGB code. 
demo 1 • demo 2
GreenInfo Network
Leaflet.Control.SideBySideA Leaflet control to add a split screen to compare two map overlays (demo).Digital Democracy

Tile Load

The following plugins change the way that tile layers are loaded into the map.

PluginDescriptionMaintainer
Leaflet.MultiTileLayerAllows to compose a TileLayer from several tile sources. Each source is active only on a defined set of zoomlevels.Mattias Bengtsson
Leaflet.FunctionalTileLayerAllows you to define tile layer URLs using a function. Even works with asynchronous sources, using promises.Ishmael Smyrnow
TileLayer.CordovaFor use with Cordova/Phonegap, adds tile caching onto local device storage, switching between offline and online mode.Greg Allensworth
TileLayer.PouchDBCachedAllows all Leaflet TileLayers to cache into PouchDB for offline use.Iván Sánchez Ortega,MazeMap
Leaflet.loadingA simple control that adds a loading indicator as tiles and other data are loaded.Eric Brelsford
Leaflet.EdgeBufferBuffer tiles beyond the edge of the viewport, for Leaflet 1.0. Demo.Alex Paterson
Leaflet.TileLayer.FallbackReplaces missing Tiles (HTTP 404 Not Found Error) by scaled up equivalent Tiles from lower zooms.ghybs
Leaflet.FeatureGroup.LoadEvents`FeatureGroup` that supports the `"loading"` and `"load"` events (for v0.7.*).G. LathoudOutdooractive.
Leaflet.GridLayer.FadeOutFades out grid layers and tilelayers when they are removed, making basemap changes smoother (for 1.0.0). Demo.Iván Sánchez

Vector tiles

Plugins to display vector tiles.

PluginDescriptionMaintainer
Leaflet.MapboxVectorTileA Leaflet Plugin that renders Mapbox Vector Tiles on canvas. See demo. Compatible with Leaflet 0.7.x only.SpatialDev
HoverboardRender vector tiles on canvas with leaflet (geojson, topojson, and protobuf). See demo. Compatible with Leaflet 0.7.x only.Tristan Davies
geojson-vtEfficient library for slicing GeoJSON data into vector tiles on the fly.Mapbox
Leaflet.VectorGridDisplay gridded vector data (GeoJSON or TopoJSON sliced with geojson-vt, or protobuf vector tiles) in Leaflet 1.0.0. See demos. Not compatible with 0.7.x.Iván Sánchez

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.

PluginDescriptionMaintainer
leaflet-omnivoreLoads & converts CSV, KML, GPX, TopoJSON, WKT formats for Leaflet.Mapbox
Leaflet.FileLayerLoads files (GeoJSON, GPX, KML) into the map using the HTML5 FileReader API (i.e. locally without server).Mathieu Leplatre
Leaflet.geoCSVLeaflet plugin for loading a CSV file as geoJSON layer.Iván Eixarch
Leaflet.ShapefilePut a shapefile onto your map as a layer.Calvin Metcalf
Leaflet.FileGDBPut an ESRI File GeoDatabase onto your map as a layer.Calvin Metcalf
Leaflet.encodedUse encoded polylines in Leaflet.Jieter
Leaflet GPXGPX layer, targeted at sporting activities by providing access to information such as distance, moving time, pace, elevation, heart rate, etc.Maxime Petazzoni
WicketA 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
qgis2webQGIS plugin to make webmaps without coding.Tom Chadwin
Leaflet-WFSTWFS client layer with transaction supportFlexberry
Leaflet-BetterScaleA new, more GIS-like scalebar with alternating black/white bars.Dan Brown

Dynamic/custom data loading

Load dynamic data which is updated in the map, or load GIS vector data in non-standard ways.

PluginDescriptionMaintainer
Leaflet RealtimePut realtime data on a Leaflet map: live tracking GPS units, sensor data or just about anything.Per Liedman
Leaflet AjaxAdd GeoJSON data via ajax or jsonp.Calvin Metcalf
Leaflet.LiveupdatePeriodically ('live') update something on a map (Demo)Martijn Grendelman
Leaflet.PouchUse 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.IndoorCreate indoor maps.Christopher Baines
Leaflet uGeoJSONAdd an auto updating GeoJSON data Layer via ajax post requests.Benjamin VADANT

Synthetic overlays

These plugins create useful overlays from scratch, no loading required.

PluginDescriptionMaintainer
Leaflet.GraticuleDraws a grid of latitude and longitude lines.Bjørn Sandvik
Leaflet.SimpleGraticuleDraws a grid lines for L.CRS.Simple coordinate system.Andrew Blakey
Leaflet.TerminatorOverlay day and night regions on a map.Jörg Dietrich
leaflet.latlng-graticuleCreate a Canvas as ImageOverlay to draw the Lat/Lon Graticule, and show the grid tick label at the edges of the map.Demo.CloudyBay

Data providers

Load overlay data from third-party-services. See also basemap providers and plugin collections.

PluginDescriptionMaintainer
Leaflet Vector LayersAllows 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 OverpassEasily include data from the overpass api.kartenkarsten
Leaflet.dbpediaLayerA layer with Points of interest from Wikipedia - loaded via ajax from DBpedia's SPARQL endpoint.Kr1
Leaflet-WikipediaA leaflet plugin to display Wikipedia API entries on a map layer.Matthew Barker

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.

PluginDescriptionMaintainer
Leaflet.ellipseLeaflet.ellipse place ellipses on map by specifying center point, semi-major axis, semi-minor axis, and tilt degrees from west.JD Fergason
Leaflet.labelAdds text labels to map markers and vector layers.Jacob Toye
Leaflet-semicircleAdds functionality to L.Circle to draw semicircles.Jieter
Leaflet.PolylineDecoratorAllows you to draw patterns (like dashes, arrows or evenly spaced Markers) along Polylines or coordinate paths.Benjamin Becquet
Leaflet.SpriteUse sprite based icons in your markers.Calvin Metcalf
Leaflet.TextPathAllows you to draw text along Polylines.Mathieu Leplatre
Leaflet-SVGIconA simple and customizable SVG icon with no external dependencies. Also included is a convenience Marker class and two example subclasses. Customizable demo with example subclassesIlya Atkin
Leaflet.BeautifyMarkersLightweight plugin that adds colorful iconic markers without image and gives full control of style to end user (i.e. Unlimited colors and CSS styling).Muhammad Arslan Sajid
Leaflet.Awesome-MarkersColorful, iconic & retina-proof markers based on the Font Awesome icons/Twitter Bootstrap iconsLennard Voogdt
Leaflet.Extra-MarkersShameless copy of Awesome-Markers with more shapes, colors and semantic-ui supportCory Silva
Leaflet.MakiMarkersCreate markers using Maki Icons from MapBox.James Seppi
Leaflet.Icon.GlyphUse icon font glyphs in your markers (from Font Awesome, Material Design Icons, Glyphicons, Metro UI icons, Elusive, and other icon fonts). (demo)Iván Sánchez Ortega
Leaflet.LineExtremitiesShow symbols at the extremities of polylines, using SVG markers.Frédéric Bonifas
Leaflet.VectorMarkersVector SVG markers for Leaflet, with an option for Font Awesome/Twitter Bootstrap icons.Mathias Schneider
Leaflet.patternAdd support for pattern fills on Paths.Tyler Eastman
Leaflet.BoatMarkerA boat marker using HTML Canvas for displaying yachts and sailboats with heading and wind information. Demo.Thomas Brüggemann
leaflet-usermarkerPlugin 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.geojsonCSSGeojson CSS implementation for Leaflet.Alexander Burtsev
OSM BuildingsAmazing JS library for visualizing 3D OSM building geometry on top of Leaflet.Jan Marsch
Leaflet.EdgeMarkerPlugin to indicate the existence of Features outside of the current view.Gerald Pape
Leaflet.orientedMarkerAllows to manage orientation of markers dynamically.Gismartwaredev
leaflet-icon-pulseRenders pulsing icon using CSS3. It can be used for location marker.mapshakers/Filip Zavadil
leaflet-mapkey-iconSet of cartographic font icons based on mapkeyicons.mapshakers/Filip Zavadil
Leaflet.PhotoPlugin to show geotagged photos on a Leaflet map. Demo.Bjørn Sandvik
Leaflet.curveA Leaflet plugin for drawing Bézier curves and other complex shapes. Demo.elfalem
Leaflet.ArcThis plugin adds L.Polyline.Arc function which wraps arc.js functionality for creation of Great Cirlce arcs.Alexey Gusev
leaflet-choroplethExtends L.geoJson to add a choropleth visualization (color scale based on value). Demo.Tim Wisniewski
leaflet-tracksymbolThis marker provides a tracksymbol with orientation, velocity-vector and configurable shape.Tim Leerhoff
leaflet-ais-tracksymbolAIS Extension for leaflet-tracksymbol It displays AIS Contacts on the Map.Johannes Rudolph
leaflet-ais-tracksymbol-searchAdds a Seach Box for your Leaflet Map and Your [leaflet-ais-trackymbol](https://github.com/PowerPan/leaflet-ais-tracksymbol)Johannes Rudolph
leaflet.marker.pinPins are markers that can be added and edited on the map by the end user. Demo.Christian Guyette
Leaflet.Marker.StackA pure Leaflet implementation of CartoDB's "stacked chips" symbolizer. Demo.Iván Sánchez
leaflet-polygon.fillPatternExtend the Polygon Object to fill SVG Path element with an image pattern.Demo.CloudyBay
Leaflet Polyline OffsetAdds to L.Polyline the ability to be shifted with a relative pixel offset, without modifying its actual LatLngs. The offset value can be either negative or positive, for left- or right-side offset, and remains constant across zoom levels (basic demo).Benjamin Becquet
leaflet-labeled-circleSpecial type of SVG marker with a label inside and draggable around the anchor point (demo).Alexander Milevski
Leaflet.ParallaxMarkerAdd markers that moves with a parallax-effect relative to the map when panning (demos / examples).Dag Jomar Mersland
leaflet-distance-markersAllows displaying markers along a route (L.Polyline) at equivalent distances (eg. one per mile) (demo).Doroszlai, Attila
leaflet-corridorRenders a polyline with width fixed in meters, not in pixels; adjusts width depending on zoom level (demo).Mikhail Shilkov

Overlay animations

These plugins animate markers or some geometries. See also geometries with time or elevation.

PluginDescriptionMaintainer
Leaflet.AnimatedMarkerAnimate a marker along a polyline.Aaron Ogle
Leaflet.BounceMarkerMake a marker bounce when you add it to a map.Maxime Hadjinlian
Leaflet.SmoothMarkerBouncingSmooth animation of marker bouncing for Leaflet.Alexei KLENIN
Leaflet.MovingMarkerAllow to move markers along a polyline with custom durations.Ewoken
Leaflet.TransitionedIconTransition in/out markers with CSS3 transitions. It supports jitter for staggering markers into view to prevent visual overload. See the demo.Brian Reavis
Leaflet.Polyline.SnakeAnimAnimates (poly)lines into existence, as if they were being slowly drawn from start to end.Iván Sánchez Ortega,MazeMap
Leaflet.AntPathLeaflet.AntPath put a flux animation (like ants walking) into a Polyline. (demo)Rubens Pinheiro
Leaflet.Marker.SlideToSmoothly move (slide) markers to a new location. (demo)Iván Sánchez Ortega,MazeMap

Clustering/Decluttering

When you are displaying a lot of data, these plugins will make your map look cleaner.

PluginDescriptionMaintainer
Leaflet.markerclusterBeautiful, sophisticated, high performance marker clustering solution with smooth animations and lots of great features. Recommended!Dave Leaver
Leaflet.LayerGroup.CollisionProvides 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 SpiderfierDeals with overlapping markers in a Google Earth-inspired way by gracefully springing them apart on click.George MacKerron
PruneClusterFast and realtime marker clustering library.Antoine Pultier
Leaflet.DeflateDeflates lines and polygons to a marker when their screen size becomes too small in lower zoom levels.Oliver Roick
Leaflet.GridClusterCreate grid-based clusters in realtime.Andreas Kiefer
q-clusterQuick point clustering library with D3 categorization.Nicholas Hallahan
Leaflet.ConditionalLayerA FeatureGroup that does not show any more than a certain amount of markers visible in the viewport. (Demo)EPP
Leaflet.FeatureGroup.SubGroupA simple plugin to create Feature Groups that add their child layers into a parent group. Typical usage is to switch them through L.Control.Layers to dynamically add/remove groups of markers from Leaflet.markercluster. Demo.ghybs

Heatmaps

These plugins create heatmaps and heatmap-like visualizations from vector data.

PluginDescriptionMaintainer
MaskCanvasCanvas layer that can be used to visualize coverage.Dominik Moritz
HeatCanvasSimple heatmap api based on HTML5 canvas.Sun Ning
heatmap.jsJavaScript Library for HTML5 canvas based heatmaps. Its Leaflet layer implementation supports large datasets because it is tile based and uses a quadtree index to store the data.Patrick Wied
Leaflet divHeatmapLightweight and versatile heatmap layer based on CSS3 and divIconsDaniele Piccone
WebGL HeatmapHigh performance Javascript heatmap plugin using WebGL.Benjamin J DeLong
Leaflet.heatA tiny, simple and fast Leaflet heatmap plugin. Uses simpleheat under the hood, additionally clustering points into a grid for performance. (Demo)Vladimir Agafonkin

DataViz

Powerful multi-purpose libraries for data visualization.

PluginDescriptionMaintainer
RaphaelLayerAllows you to use Raphael as a layer on a Leaflet map for advanced animations and visualizations.Dynamic Methods
Leaflet Data Visualization FrameworkNew markers, layers, and utility classes for easy thematic mapping and data visualization.Scott Fairgrieve
Leaflet.D3SvgOverlaySVG overlay class for using with D3 library. Supports zoom animation and scaling without need to redraw the layer.Kirill Zhuravlev
mapbox-gl-leafletBinding from Mapbox GL JS to the Leaflet APITom MacWright
leaflet-echartsA plugin for Leaflet to load echarts map and make big data visualization easier.wandergis
jquery-storymapA jQuery plugin to display several map locations as the user scrolls through paragraphs.Atle Frenvik Sveen
Leaflet for RAllows using Leaflet from within Rprograms, a programming language popular for statistical analysis and data mining.RStudio team

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.

PluginDescriptionMaintainer
Leaflet.PMGeometry Management for Leaflet 1.0. Draw, Edit, Drag and Snap Polylines, Polygons, LayerGroups and geoJSON.Sumit Kumar
Leaflet.FreeDrawZoopla inspired freehand polygon creation using Leaflet.js and D3.Wildhoney
Leaflet.plotterleaflet-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
Leaflet.Editable.PolylineEditable polylines: move existing points, add new points and split polylines.Tomo Krajina
Leaflet.drawEnables drawing features like polylines, polygons, rectangles, circles and markers through a very nice user-friendly interface with icons and hints. Recommended!Jacob Toye
Leaflet.EditableHandlersA set of plugins that includes circle editing, measuring tool, and label for polygon sides.Kartena
Leaflet.StyleEditorEnables editing the styles of features (lines, polygons, etc) and markers with a GUI.Dennis Wilhelm
Leaflet.SimpleMarkersA light-weight Leaflet plugin for adding and deleting markers.Jared Dominguez
Leaflet.EditableLightweight fully customisable and controlable drawing/editing plugin.Yohan Boniface
Leaflet.Path.DragDrag handler and interaction for polygons and polylines (Demo)Alexander Milevski
Leaflet.Path.TransformScale & rotate handler and interaction for polygons and polylines (Demo)Alexander Milevski
Leaflet.SnapEnables snapping of draggable markers to polylines and other layers.Mathieu Leplatre
Leaflet.MapPaintBitmap painting plugin designed for touch devices.Antoine Pultier
Leaflet.StorageCreate/update/delete Map, Marker, Polygon, Polyline... and expose them for backend storage with an API.Yohan Boniface
Leaflet.PatherL.Pather is a freehand polyline creator that simplifies the polyline for mutability. Requires D3 support.Wildhoney
Leaflet.IllustrateExtension for Leaflet.draw enabling users to type annotations directly on maps.Justin Manley
Leaflet.PinEnable attaching of markers to other layers during draw or edit features with Leaflet.Draw.Konrad Klimczak

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.

PluginDescriptionMaintainer
Leaflet.TimeDimensionAdd time dimension capabilities on a Leaflet map. DemosICTS SOCIB
Leaflet Time-SliderThe Leaflet Time-Slider enables you to dynamically add and remove Markers on a map by using a JQuery UI sliderDennis Wilhelm
LeafletPlaybackPlay back time-stamped GPS Tracks synchronized to a clock.Nicholas Hallahan
Leaflet.timelineDisplay arbitrary GeoJSON on a map with a timeline slider and play button.Jonathan Skeate
Leaflet.ElevationA Leaflet plugin to view interactive height profiles of GeoJSON lines using d3.Felix Bache
Leaflet.hotlineA Leaflet plugin for drawing gradients along polylines.iosphere

Search & popups

Plugins that search for overlays and enhance how to display information about them.

PluginDescriptionMaintainer
leaflet-fusesearchA control that provides a panel to search features in a GeoJSON layer using the lightweight fuzzy search Fuse.jsAntoine Riche
Leaflet SearchA control for search Markers/Features location by custom property in LayerGroup/GeoJSON. Support AJAX/JSONP, Autocompletion and 3rd party serviceStefano Cudini
Leaflet.RroseA 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.utfgridProvides a utfgrid interaction handler for leaflet a very small footprint.Dave Leaver
Leaflet.RevealOSMVery simple but extendable Leaflet plugin to display OSM POIs data on map click.Yohan Boniface
Leaflet UnderneathFind interesting features near a location using Mapbox Vector Tiles data, to add interactive functionality to a tile layer with speed and limited bandwidth.Per Liedman
Leaflet.GeoJSONAutocompleteLeaflet Autocomplete For Remote Searching with GeoJSON Services.Yunus Emre Özkaya
L.tagFilterButtonLeafLet marker filtering by tagsMehmet Aydemir
Leaflet-gplaces-autocompleteAdd google places search into mapMichal Haták

Area/overlay selection

These plugins help users select either overlays or areas in the map.

PluginDescriptionMaintainer
Leaflet.AreaSelectA fixed positioned, resizable rectangle for selecting an area on the map.Jonatan Heyman
leaflet-locationfilterA draggable/resizable rectangle for selecting an area on the map.Robert Kajic
L.Control.LineStringSelectFast LineString(polyline) partial selection tool: select a stretch between two points in a complex path. DemoAlexander Milevski
Leaflet.FeatureSelectUse a configurable centerpoint marker to select any geometry type from a GeoJSON layer.Aaron Ogle
Leaflet GeoJSON SelectorLeaflet Control for selection from GeoJSON feature in a interactive list and map(Demo).Stefano Cudini
Leaflet.CheapLayerAtAllows querying which layer is under a screen coordinate (Demo).Iván Sánchez Ortega,MazeMap

Map interaction

New ways to interact with the map itself.

Layer switching controls

The following plugins enhance or extend L.Control.Layers.

PluginDescriptionMaintainer
Leaflet.AutoLayersAutomatically pull layers from multiple mapservers and organize/search them with user controlled overlay zindex management.Alex Ebadirad
Leaflet.SelectLayersa 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.StyledLayerControlA Leaflet plugin that implements the management and control of layers by organization into categories or groups.Davi Custodio
Leaflet.GroupedLayerControlLeaflet layer control with support for grouping overlays together.Ishmael Smyrnow
Leaflet Control Order LayersAdds the ability to change overlay order in the layers control.Michael Salgado
Leaflet Categorized LayersLeaflet Control Layers extended for groups of categorized layersRobbie Trencheny
Leaflet Panel LayersLeaflet Control Layers extended for group of layers and icons legendStefano Cudini
Leaflet.UniformControlLeaflet layer control with stylable checkboxes and radio buttons.Chris Calip
Leaflet-IconLayersLeaflet control that displays base layers as small icons (demo).Alexander Zverev
Leafet.LayerTreePluginLeaflet control allows to switch layers on and off, display them in a tree-like way (demo).Alexander Arakelyan
Leaflet.BasemapsA basemap chooser with a preview image from the tile stack. ExampleBrendan Ward

Interactive pan/zoom

Change the way the user can interactively move around the map.

PluginDescriptionMaintainer
Leaflet.PancontrolA simple panning control.Kartena
Leaflet.BoxZoomA visible, clickable control to perform a box zoom.Greg Allensworth
Leaflet.zoomsliderA zoom slider control.Kartena
Leaflet.BorderPanA Leaflet plugin to pan by clicking on map borders.Sebastián Lara
Leaflet GameControllerInteraction handler providing support for gamepads.Antoine Pultier
Leaflet.twofingerZoomInteraction handler for touch devices enabling zooming out with a two finger tap.Adam Ratcliffe
Leaflet.ZoomBoxA lightweight zoom box control: draw a box around the area you want to zoom to. DemoBrendan Ward
Leaflet LimitZoomPlugins to limit available zoom levels to a given list, either by restricting zooming or by interpolating tiles.Ilya Zverev
Leaflet.DoubleRightClickZoomInteraction handler enabling zooming out with double right click.Mike O'Toole
Leaflet.ZoomLabelA simple zoom label control.Masashi Takeshita

Bookmarked pan/zoom

Change the way the user is moved around the map, by jumping to predefined/stored places.

PluginDescriptionMaintainer
Leaflet.viewcenterA simple control that adds a button to change view and zoom to predefinied values in options.Dariusz Pawlak
leaflet-zoom-minAdds 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 ToolbarLeaflet control for simple back, forward and home navigation.David C
Leaflet LocationlistA control to jump between predefined locations and zooms.Ivan Ignatyev
Leaflet.defaultextentA control that returns to the original start extent of the map. Similar to the HomeButton widget.Alex Nguyen
Leaflet.BookmarksControl for adding and navigating between user-created bookmarks on the map.Alexander Milevski
Leaflet.ShowAllA control that can show a predefined extent while saving the current one so it can be jumped back to.Mor Yariv
Leaflet.zoomhomeZoom control with a home button for resetting the view (Demo)Florian Brucker
Leaflet-HistoryTrack history of map movements and zoom locations similar to a browser.Chris Scott
Leaflet.RestoreViewStores and restores map view using localStorage.Mathieu Leplatre
leaflet-hashPlugin 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.

PluginDescriptionMaintainer
Leaflet.fullscreenA fullscreen button control by mapboxmapbox
leaflet.fullscreenAnother fullscreen button control but for modern browsers, using HTML5 Fullscreen API.Bruno B
leaflet.zoomfsA 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.

PluginDescriptionMaintainer
Leaflet.SyncSynchronized view of two maps.Bjørn Sandvik
Leaflet.MiniMapA small minimap showing the map at a different scale to aid navigation.Robert Nordan
Leaflet.MagnifyingGlassAllows 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-minimapExtends the default Leaflet layers control with synced minimaps.Jieter
Leaflet.GlobeMiniMapSimple minimap control that places a 3D Globe in the corner of your map, centered on the same location as the main map (demo).Chris Whong

Measurement

Allow the user to measure distances or areas.

PluginDescriptionMaintainer
Leaflet.MeasureControlA simple tool to measure distances on maps (*relies on Leaflet.Draw*).Makina Corpus
Leaflet.MeasureAreaControlControl for measuring element's area.Ondrej Zvara
leaflet-measureCoordinate, linear, and area measure control for Leaflet mapsLJA GIS
leaflet-graphicscaleAnimated graphic scale control (demo).Erik Escoffier
Leaflet.ScaleFactorDisplay a Scale Factor (e.g. 1:50,000) for Leaflet maps (Demo)Marc Chasse
Leaflet.nauticscaleDisplay a Nauticscale on Leaflet mapsJohannes Rudolph
Leaflet Measure PathShow measurements on paths; polylines, polygons and circles currently supported (demo)Per Liedman / Prominent Edge

Mouse coordinates

Show the geographical coordinates under the mouse cursor in different ways.

PluginDescriptionMaintainer
Leaflet.MousePositionA simple MousePosition control that displays geographic coordinates of the mouse pointer, as it is moved about the mapArdhi Lukianto
Leaflet.CoordinatesA simple Leaflet plugin viewing the mouse LatLng-coordinates. Also views a marker with coordinate popup on userinput.Felix Bache
Leaflet Coordinates ControlCaptures mouseclick and displays its coordinates with easy way to copy them.Michal Zimmermann
Leaflet.NACCoordinatesDisplays NAC coordinate of the mouse pointer on mouse move (Demo)Mahmood Dehghan
Leaflet.mouseCoordinatesDisplays the Mouse Coordinate in a Box. Multiple Formats Are Possible
  • GPS
  • UTM
  • UTMREF / MGRS
  • QTH
Johannes Rudolph
Leaflet Location PickerSimple location picker with mini Leaflet map (Demo)Stefano Cudini
Leaflet.MapCenterCoordA Leaflet control to display the coordinates of the map center, especially useful on touch/mobile devices. (Doc & demos)Xisco Guaita
Leaflet.MapcodesDisplays the Mapcode of the mouse pointer on mouse move (Demo)Martin Atukunda

Events

These plugins extend Leaflet event handling.

PluginDescriptionMaintainer
L.SleepAvoid unwanted scroll capturing. Demoatstp
Leaflet.OverIntentAdds a new event ``mouseintent``, that differs from ``mouseover`` since it reflects user intentions to aim a particular layer.Mathieu Leplatre
Leaflet.AlmostOverTrigger mouse events when cursor is "almost" over a layer.Mathieu Leplatre
Leaflet-active-areaThis 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.ControlledBoundsInspired 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
singleclickExtend L.Map to fire a singleclick event (demo). Compatible with Leaflet 0.7.x only.Guillaume Lathoud
singleclickExtend L.Evented to fire a singleclick event (demo). Compatible with Leaflet 1.0.0-beta1 and greater only.Iván Sánchez Ortega,MazeMap
Leaflet.VisualClickAdds visual feedback when user clicks/taps the map (demo). Useful when further action is delayed by server requests, or implementation of Leaflet.singleclick. Or just because it looks cool :) Only tested with Leaflet 1.0.0-beta1.Dag Jomar Mersland,Iván Sánchez Ortega,MazeMap
Leaflet Touch HelperMakes it easy to touch vector overlays with thick fingers on a small display by adding a transparent, larger touch surfacePer Liedman / Prominent Edge

User interface

Buttons, sliders, toolbars, sidebars, and panels.

PluginDescriptionMaintainer
L.EasyButtonIn one line, add a Font Awesome control button with attached click events. Demoatstp
Leaflet.contextmenuA context menu for Leaflet.Adam Ratcliffe
Leaflet.CountrySelectControl with menu of all countries, and an event listener that returns the selected country as a GeoJSON feature (demo)Anika Halota
leaflet-sidebarA responsive sidebar plugin.Tobias Bieniek
sidebar-v2Another responsive sidebar plugin. This time with tabs!Tobias Bieniek
Leaflet.MessageboxDisplay a temporary text message on a map (Demo)Martijn Grendelman
Leaflet.TileLegendCreate illustrated and interactive legends for your background layers.Yohan Boniface
Leaflet.toolbarFlexible, extensible toolbars for Leaflet maps. View an example here.Justin Manley
L.CreditsA simple, attractive, interactive control to put your logo and link in the corner of your map.Greg Allensworth
Leaflet.SpinShows a nice spinner on the map using Spin.js, for asynchronous data load, like with Leaflet Ajax.Mathieu Leplatre
Leaflet WeatherA Leaflet plugin for adding a weather widget to the map using OpenWeatherMap API (Demo).Osk
Leaflet ResizableControlA Leaflet plugin to add a resizable and scrollable control to the map (Demo).David Albrecht
Leaflet.SliderAdds a <input type="range"> slider that calls a function every time its input is changed (Demo)EPP
leaflet-control-windowCreates modal/modeless, draggable, responsive, customisable window in your map.mapshakersFilip Zavadil
Leaflet.CoordinatedImagePreviewDisplays coordinated images in map bounds.Yunus Emre Özkaya
Leaflet.SlideMenuA simple slide menu for Leaflet.Masashi Takeshita
Leaflet.DialogA simple resizable, movable, customizable dialog box. (Demo)NBT Solutions
Leaflet.BootstrapZoomOverrides default zoom control buttons with Twitter Bootstrap styled onesAlexey Gusev
Leaflet.CondensedAttributionAn attribution plugin that makes long attributes visible on hoverMotion Intelligence GmbH

Print/export

Print or export your map.

PluginDescriptionMaintainer
Leaflet.printImplements the Mapfish print protocol allowing a Leaflet map to be printed using either the Mapfish or GeoServer print module.Adam Ratcliffe
Leaflet-imageExport images out of Leaflet maps without a server component, by using Canvas and CORS.Tom MacWright

Geolocation

Plugins that extend Leaflet’s geolocation capabilities.

PluginDescriptionMaintainer
L.LocationShareAllow users to send and receive a marker with a message. Demoatstp
Leaflet.LocateA customizable locate control.Dominik Moritz
Leaflet Control CompassA leaflet control plugin to build a simple rotating compassStefano Cudini
Leaflet.AccuratePositionLeaflet.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).

PluginDescriptionMaintainer
Proj4LeafletProj4js integration plugin, allowing you to use all kinds of weird projections in Leaflet.Kartena
arc.jsA JS library for drawing great circle routes that can be used with Leaflet.Dane Springmeyer
Leaflet-pipSimple point in polygon calculation using point-in-polygon.Tom MacWright
Leaflet.GeometryUtilA collection of utilities for Leaflet geometries (linear referencing, etc.)Benjamin BecquetMathieu Leplatre
Greiner-HormannGreiner-Hormann algorithm for polygon clipping and binary operations, adapted for use with Leaflet.Alexander Milevski
Leaflet.GeodesicDraw 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.bufferEnables buffering of shapes drawn with Leaflet.draw.Jonathan Skeate
Leaflet.LayerIndexAn efficient spatial index for features and layers, using RTree.js.Mathieu Leplatre
leaflet-spatial-prefix-treeLeaflet plugin for visualizing spatial prefix trees, quadtree and geohash. See demoMapzen

Routing

The following plugins use external services to calculate driving or walking routes.

PluginDescriptionMaintainer
Leaflet Routing MachineControl for route search with via points, displaying itinerary and alternative routes. Uses OSRM by default, but also supportsGraphHopperMapbox Directions API and more.Per Liedman
Leaflet.RoutingLeaflet 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
Leaflet RouteBoxerThis 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.Nearest!

Geocoding

External services that transform an address or the name of a place into latitude and longitude (or vice versa).

PluginDescriptionMaintainer
Leaflet GeoSearchSmall 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 GeocoderA simple geocoder that uses OpenstreetMap Nominatim to locate places by address.Karsten Hinz
Leaflet Control Bing GeocoderA simple geocoder control that uses Bing to locate places.Samuel Piquet
Leaflet Control GeocoderA 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 LocatorA simple plugin that allows finding the approximate location of IP addresses and map centering on said location.Jakub Dostal
Esri Leaflet GeocoderA geocoding control with suggestions powered by the ArcGIS Online geocoder.Patrick Arlt
Leaflet.OpenCage.SearchA search plugin plugin that uses OpenCage Data's geocoding API.The OpenCageteam
Leaflet.GeonamesA lightweight geocoding control powered by GeoNamesDemoBrendan Ward
Mapzen Search Leaflet GeocoderA geocoding control using Mapzen Search or any hosted service powered by the Pelias Geocoder API.DemoLou Huang

Plugin collections

Sets of plugins that span several categories.

Plugin developers: please keep future plugins in individual repositories.

PluginDescriptionMaintainer
Plugins by Pavel ShramovA set of plugins for: GPX, KML layers; Bing tile layer; Google and Yandex layers (implemented with their APIs), permalink and distance measurement controls.Pavel ShramovBruno B
Spectrum4LeafletTools for using Spectrum Spatial Server services with leaflet. This plugin supports: map service, tile service, feature service. It has layers, legend and feature controls.SVoytESTI MAP
MapBBCode-related leaflet pluginsSeven 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.

PluginDescriptionMaintainer
Leaflet Yeoman GeneratorYeoman generator that scaffolds out a basic Leaflet map application.Moritz Klack
react-leafletReact components for Leaflet maps.Paul Le Cam
Leaflet.CSSAdd the main Leaflet CSS files (or any css) from within JavaScript, be gone conditional comments.Calvin Metcalf
Leaflet LayerConfigProvide a json file or service response with a configuration of layers and markers to automatically set up a Leaflet client.Alexander Nossum
Leaflet.i18nInternationalization for Leaflet plugins.Yohan Boniface
Leaflet ZoomLevel CSS ClassAdd zoom level css class to map element for easy style updates based on zoom levelsDag Jomar Mersland
famous-mapIntegrate Leaflet in applications made with the famo.us web framework.Hein Rutjes
Angular Leaflet directiveIntegrate Leaflet in applications made with the AngularJS web framework.David Rubert
Tiny Leaflet DirectiveTiny LeafletJS map directive for your AngularJS apps.Martin Tesař
Leaflet Popup AngularUse AngularJS in your Leaflet popups. Extends the built-in L.popup.Grant Harris
Leaflet Control AngularInsert and use Angularized HTML code in your Leaflet map as a Leaflet control.Grant Harris
<leaflet-map>Integrate Leaflet in applications made with the Polymer >= 1.0 web component framework.Hendrik Brummermann,Prateek Saxena
Leaflet map componentIntegrate Leaflet in applications made with the Polymer 0.5 web framework.Prateek Saxena
JSF2LeafA JavaServer Faces wrapper for Leaflet.Leonardo Ciocari
ember-leafletEasy and declarative mapping for Ember.jsusing Leaflet.Miguel Andrade
meteor-leafletProvides a Meteor package to quickly build real-time cross-platform map apps.Bevan Hunt
L.Control.BootstrapModalTrigger a Bootstrap modal using an on-map control.Greg Allensworth
L.Control.jQueryDialogTrigger a jQuery UI dialog/modal using an on-map control.Greg Allensworth

3rd party integration

The following plugins integrate Leaflet into third party services or websites.

PluginDescriptionMaintainer
Leaflet.EditInOSMAdd a control with links to open the current map view on main OSM editors.Yohan Boniface
Maps Marker ProA WordPress plugin that enables users to pin, organize and share their favorite places and tracks through their WordPress powered site.Robert Harm
WordPress Leaflet MapInteractive and flexible shortcode to create multiple maps in posts and pages, and to add multiple markers on those maps.Benjamin J DeLong
MaptiksAnalytics platform for web maps. Track map activities, layer load times, marker clicks, and more!Sparkgeo
Leaflet for DrupalA Drupal (7.x and 8.x) module to integrate Leaflet maps in your Drupal site. Contains a field formatter to show a map for fields containing geospatial data, Views integration to plot data on a map, and a lightweight and easy to use API. Currently used by over 10.000 sites.Marzee Labs, and more maintainers listed at drupal.org

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 /docs/plugins.md to our GitHub repository.

© 2015 Vladimir Agafonkin. Maps © OpenStreetMap contributors.

转载于:https://www.cnblogs.com/Ironman-Jason/p/5979915.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值