Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Leaflet

30,105 sites Security covered Drupal 10โ€“11 Leaflet ecosystem
View on drupal.org

This module provides advanced integration with the Leaflet JavaScript mapping library for Drupal. It allows for displaying geospatial data on maps using field formatters and integrating map views, with options for editing geometries and adding various map controls and overlays.

Drupal advanced integration with the
Leaflet JS mapping library.

A Modern, Lightweight Open-Source JavaScript Library for Interactive Web Mapping

Drupal Leaflet module is dependant from the
Geofield module.

> ๐Ÿ‘‰ LIVE DEMO <


MOST RELEVANT LATEST NEWS

Leaflet Version 10+

Drupal Community documentation (WIP)

Featured options and functionalities

  • Easy-to-use programmatic API via LeafletService for extended Leaflet map definition, rendering, and customisation;
  • Field formatter (LeafletDefaultFormatter) for read-only map display from any Geofield value;
  • Field widget (LeafletDefaultWidget) with Leaflet-Geoman
    integration for creating and editing Points and Geometries (LineString, Polygon);
  • GeoJSON overlays (external and internal sources) on the widget map as visual
    snapping references for precise drawing;
  • Popups and Tooltips on map features, with AJAX lazy-load support for popup content;
  • Multi-layer base map control and overlay layers control via Drupal Views grouping;
  • Vector tile rendering via MapLibre GL JS tile layer support;
  • Dynamic marker icons and path/geometry styling with Token and replacement-pattern support;
  • Marker clustering via Leaflet.markercluster (bundled as leaflet_markercluster submodule);
  • Views integration via the leaflet_views submodule: Views style plugin, row plugin, and an Attachment display for overlaying markers from one view onto another view's map;
  • Bundled map controls: gesture handling (GestureHandling),
    reset view (ResetView),
    fullscreen (FullScreen),
    and user location (Locate);
  • Feature additional properties for advanced and dynamic customisation of map
    and feature rendering logic;
  • Address search geocoding with autocomplete (requires Geocoder module);
  • Multiple Leaflet maps (formatters, Views, and widgets) on the same page;
  • Drupal hooks (hook_leaflet_map_info(), hook_leaflet_map_info_alter()) for defining and altering map definitions, features, and rendering;
  • JavaScript events (leafletMapInit, leaflet.feature, leaflet.features) dispatched on the map container for frontend integration and customisation.

Installation and Use

Require/Download the Leaflet module using Composer, which is simply running
the following command from your project package root (where the main
composer.json file is sited):

composer require drupal/leaflet

which will also download the required Geofield Module
dependency (and GeoPHP library).

Read the instructions in the Readme.md file for further details, on how to
enable the Leaflet module and its submodules.

Additional Drupal Integrations

Leaflet module works well with the following modules;

D8 version started by RdeBoer of flink, and evolved to maturity by Itamair.

Leaflet Version 7

The Leaflet module features:

  • Field formatter that can show a map for fields that contain geospatial data.
  • Views integration that plots data on a map (using the sub module Leaflet Views).
  • Lightweight and easy to use API for defining maps and displaying data on a map.

Some modules that build on Leaflet, adding various features:

  • Leaflet More Maps: adds over 20 map styles, selected at the flick of a drop-down
  • Leaflet Label: alternative tool tip hovers for polygons and line strings
  • Leaflet Hash: bookmarking for maps, appends a hash of current map center and zoom to the URL, so you save and restore the "view port"
  • Leaflet MarkerCluster: makes large marker populations easier to navigate through animated clustering and drill-down capability
  • IP Geolocation Views & Maps: adds a swag of cool features such as centering options, markers colour-coded by any field in your View, cross-highlighting between content and map, geocoding and reverse geocoding options.
  • Many more...

Drupal Leaflet Showcase

Some Cool Websites using Drupal Leaflet

D7 version originally developed by ThinkShout and @pvhee (from Marzee Labs) with lots of help from the community.

Depends on

Dependencies of the latest stable release

Required by

11 tracked projects depend on this one

Activity

Tracked releases
52
Tracked since
Nov 2024
Latest release
4 days ago
Releases (12 mo)
18 ▼ from 34
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
10.4.12 Stable 10โ€“11 Aug 27, 2026
10.4.11 Stable 10โ€“11 Aug 23, 2026
10.4.10 Stable 10โ€“11 Aug 7, 2026
10.4.9 Stable 10โ€“11 May 22, 2026
10.4.8 Stable 10โ€“11 May 6, 2026
10.4.7 Stable 10โ€“11 Apr 29, 2026
10.4.6 Stable 10โ€“11 Apr 28, 2026
10.4.5 Stable 10โ€“11 Apr 18, 2026
10.4.4 Stable 10โ€“11 Feb 23, 2026
10.4.3 Stable 10โ€“11 Feb 18, 2026
10.4.2 Stable 10โ€“11 Feb 5, 2026
10.4.1 Stable 10โ€“11 Jan 10, 2026
10.4.x-dev Dev 10โ€“11 Jan 10, 2026
10.4.0 Stable 10โ€“11 Jan 10, 2026
10.3.12 Stable 9โ€“11 Jan 10, 2026
10.3.11 Stable 9โ€“11 Oct 29, 2025
10.3.10 Stable 9โ€“11 Oct 3, 2025
10.3.9 Stable 9โ€“11 Sep 2, 2025
10.3.8 Stable 9โ€“11 Aug 31, 2025
10.3.7 Stable 9โ€“11 Jul 24, 2025
10.3.6 Stable 9โ€“11 Jul 24, 2025
10.3.5 Stable 9โ€“11 Jul 6, 2025
10.2.50 Stable 9โ€“11 Jun 27, 2025
10.3.4 Stable 9โ€“11 Jun 27, 2025
10.3.3 Stable 9โ€“11 Jun 23, 2025
10.3.1 Stable 9โ€“11 Jun 18, 2025
10.2.49 Stable 9โ€“11 Jun 18, 2025
10.3.0 Stable 9โ€“11 Jun 13, 2025
10.2.48 Stable 9โ€“11 May 25, 2025
10.2.47 Stable 9โ€“11 May 24, 2025
10.3.x-dev Dev 9โ€“11 May 15, 2025
10.2.46 Stable 9โ€“11 Apr 30, 2025
10.2.45 Stable 9โ€“11 Apr 22, 2025
10.2.44 Stable 9โ€“11 Apr 13, 2025
10.2.43 Stable 9โ€“11 Mar 4, 2025
10.2.42 Stable 9โ€“11 Feb 28, 2025
10.2.41 Stable 9โ€“11 Feb 18, 2025
10.2.40 Stable 9โ€“11 Feb 16, 2025
10.2.39 Stable 9โ€“11 Feb 16, 2025
10.2.38 Stable 9โ€“11 Feb 9, 2025
10.2.37 Stable 9โ€“11 Feb 8, 2025
10.2.36 Stable 9โ€“11 Feb 3, 2025
10.2.35 Stable 9โ€“11 Jan 14, 2025
10.2.34 Stable 9โ€“11 Jan 12, 2025
10.2.33 Stable 9โ€“11 Jan 8, 2025
10.2.32 Stable 9โ€“11 Jan 1, 2025
10.2.31 Stable 9โ€“11 Dec 27, 2024
10.2.30 Stable 9โ€“11 Dec 18, 2024
10.2.29 Stable 9โ€“11 Dec 4, 2024
10.2.28 Stable 9โ€“11 Dec 3, 2024