Module Description
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.

Leaflet versions for Drupal 8, 9 & 10 >> Drupal 9 Live Demo <<

LATEST NEWS
November 2022: Leaflet 10.0.x is out, with full support for Drupal 10 (and 9), backword comaptibility with Leafalet 2.2.x and a lot of cool enhancements and refinements.

Refer to #3323438 Leaflet project issue for more info.

The droptimes.com article on Leaflet 10.0.x Release.

Features and Options

* Easy to use API for extended Leaflet Map definition & customisation;
* Leaflet Default Widget, with advanced integration with Leaflet-Geoman plugin for creating and editing Points and Geometries (Linestring, Polygon) Layers;
* Leaflet Tooltips and Popups;
* Leaflet Multi Maps Base Layers Control;
* Leaflet Overlays Control via Drupal Views Grouping;
* Dynamic Markers Icons and Paths/Geometries Styling, with tokens and replacement patterns;
* Markerclustering,via Leaflet.markercluster plugin;
* Leaflet Gesture handling, via Leaflet.GestureHandling plugin;
* Reset Map View Control via Leaflet.ResetView plugin;
* Fullscreen Control, via Leaflet.Control.FullScreen plugin;
* User Location Control, via Leaflet.Locate plugin;
* Feature Additional Properties settings for advanced / dynamic customisation of Leaflet Map and Features rendering logics;
* Address Search Geocoding with Autocomplete integration (requires Geocoder module);
* Token and Replacement Patterns in Leaflet components settings;
* Multiple Leaflet maps (mixed of Leaflet Formatters, Views and Widgets) on the same page;
* Drupal hooks for altering and interacting with its functionalities;
* etc. ...

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;


* Geofield Map
* Leaflet More Maps
* Leaflet More Markers
* Leaflet Layers
* Views GeoJSON
* Leaflet GeoJSON

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

The Drupal 7 version of Leaflet 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...

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

Project Usage
25339
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
The Leaflet module aims to provide advanced integration with the Leaflet JS mapping library in Drupal, offering features such as easy API for map customization, tooltips and popups, marker clustering, and more.
Data Name
leaflet

OPENAI CHATBOT

OPENAI CHATBOT

16:23:54
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.