Integration with the Leaflet JS mapping library.
A Modern, Lightweight Open-Source JavaScript Library for Interactive Maps (by CloudMade).
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.
IMPORTANT!: Since 8.x-1.2 the Leaflet module itself contains the "Leaflet Markecluster" submodule, that integrates the Leaflet Markercluster Js library (version 1.4.1).
IMPORTANT!: (warning before upgrading from 8.x-1.2 to 8.x-1.3 version)
Leaflet Markecluster settings will be lost upgrading from 8.x-1.2 to 8.x-1.3 version.
Thus you are invited to store them before the upgrade, and reapply them manually, after it. Sorry for that. (more info).
Please refer to the README file included into the project for all the details, including help on installation, configuration and usage.
The Drupal 7 version of Leaflet
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...
The Drupal 8 version of Leaflet
In stable and usable version,
IMPORTANT!: Since 8.x-1.2 the Leaflet module itself contains the "Leaflet Markecluster" submodule, that integrates the Leaflet Markercluster Js library (version 1.4.1).
It needs to be installed using Composer to manage Drupal site dependencies, which will also download the required Geofield Module dependency and GeoPHP library.
It means simply running the following command from your project root (where the main composer.json file is sited):
$ composer require 'drupal/leaflet'
Read the Installation and Use instructions in the Readme.md file for further details.
D7 version originally developed by ThinkShout and @pvhee (from Marzee Labs) with lots of help from the community.
D8 version started by RdeBoer of flink, and evolved to maturity by Itamair.
Please help out and contribute so that Leaflet remains at the cutting edge of the Drupal geo stack.