The Leaflet Choropleth module provides advanced choropleth mapping capabilities for Drupal applications, enabling the visualization of statistical data through color-coded geographic regions. This module seamlessly integrates with the existing Drupal Leaflet and Geofield ecosystem to deliver professional-grade thematic mapping functionality.

> 👉 LIVE DEMO <

Installation

Composer Installation

composer require drupal/leaflet_choropleth

Module Installation

Via Drupal Admin UI:

  1. Navigate to /admin/modules
  2. Search for "Leaflet Choropleth"
  3. Check the module checkbox
  4. Click "Install"

Via Drush:

drush en leaflet_choropleth

Configuration and Usage

View Style Integration

The module provides a leaflet_choropleth_map view style plugin that integrates seamlessly with the leaflet_map view style from the Leaflet module and its "leaflet_view" submodule. This integration adds and enables an additional "Choropleth Map Settings" section where to configure choropleth-specific settings alongside standard leaflet mapping options.

Usage requirements and setup

The choropleth visualization applies only to features with polygon or multipolygon geometry types.

To enable a choropleth map for your data, follow these steps:

Classifications and Color Ranges

The module implements a robust plugin system for data classification and color schemes:

Classification Methods:

Color Ranges:

Legend Configuration

The module provides a configurable legend system that can be:

Theming Integration

Leaflet choropleth layers can be seamlessly integrated and mixed with existing leaflet mapping features, allowing for:

Dependencies

Development Status and Roadmap

The Leaflet Choropleth module is being developed and deployed to the Drupal community for testing and review, with the intention of eventual integration into the main Leaflet module as a leaflet_choropleth submodule once thoroughly validated and consolidated by the community.