talira

The leading open-source JavaScript library for interactive maps

open sourceBSD-2-Clausefree

Leaflet is a lightweight open source JavaScript library for interactive web maps, about 40 KB of JavaScript. It shows raster tile layers such as OpenStreetMap, with markers, popups and tooltips, polylines, polygons and circles drawn as SVG or Canvas, and image, video and SVG overlays. Maps pan smoothly with inertia, zoom with the wheel, pinch, double tap or shift-drag, work with mouse, touch and pen on desktop and mobile, stay sharp on high-DPI screens and are styled with plain CSS. It supports custom projections and non-geographical maps for floor plans, games or images, keyboard navigation and accessible controls, and a large ecosystem of plugins adds clustering, drawing, heatmaps, routing and more. It's free under the BSD-2-Clause licence; Leaflet 2.0 is in beta.

Problems it solves

  • add an interactive map with markers and popups to my website
  • show OpenStreetMap tiles on a web page without paying for Google Maps
  • a lightweight JavaScript map library that works on mobile
  • draw polygons, routes and circles on a web map
  • an interactive map of a floor plan, game world or large image
  • display GeoJSON data on a map in the browser

Features

  • Tile layers such as OpenStreetMap
  • Markers, popups and tooltips
  • Polylines, polygons and circles in SVG or Canvas
  • Image, video and SVG overlays
  • Smooth panning and pinch, wheel and double-tap zoom
  • Mouse, touch and pen support
  • Zoom, layers, scale, fullscreen and attribution controls
  • High-DPI rendering and fractional zoom
  • Custom projections and non-geographical maps
  • Keyboard navigation and accessible controls
View 2 more
  • Plugin ecosystem
  • About 40 KB of JavaScript

Capabilities

Takes pluginsplan not known

Alternatives

The same job

These do what Leaflet does.

  1. Mapbox Maps, navigation, search and location data for developers
  2. Google Maps Platform Google's maps, routes, places and geospatial APIs for developers
  3. OpenLayers High-performance JavaScript library for interactive web maps
  4. MapLibre GL JS Open-source TypeScript library for interactive vector tile maps in the browser
  5. Mapbox GL JS JavaScript library for interactive vector maps with Mapbox
  6. mapcn Free, customisable map components for React, built on MapLibre GL and styled like shadcn/ui

Compare Leaflet with the top 3