Leaflet GeoJSON powered map
Leaflet GeoJSON configuration screen

Leaflet GeoJSON is a set of modules for creating Leaflet maps backed by GeoJSON data and leverage a bounding box strategy.

Why use Leaflet GeoJSON?

The Leaflet javascript library and its Drupal integration module are great tools for providing mobile-friendly, interactive maps based on your data. One benefit of combining Leaflet with Views GeoJSON is that you can leverage a bounding box strategy. Here's a definition from the OpenLayers site:

The BBOX strategy requests data within a bounding box. When the previously requested data bounds are invalidated (by browsing to some area not covered by those bounds), another request for data is issued

A standard use case goes like

  1. Create a GeoJSON feed using the Views GeoJSON module.
  2. Add the bounding box argument to the GeoJSON view.
  3. Use a leaflet map preset defined by the Leaflet module, in code or one of the integration modules.
  4. Put them all together using the Map pane CTools content type plug-in (since 2.x) in combination with Panels or use the Leaflet GeoJSON Bean module (since 1.x) or .


Leaflet GeoJSON
Provides API functionality as defining GeoJSON sources and adding a Leaflet bounding box strategy.

Leaflet GeoJSON Bean
Allows you to create leaflet map blocks based on GeoJSON data and will automatically extend them with the bounding box strategy if supported.
Custom blocks? Even better, we are using: Bean.


  • Leaflet
  • (optional) Views GeoJSON for automatically discovered GeoJSON sources
  • (optional) Bean as a dependency for Leaflet GeoJSON Bean


Implement custom GeoJSON sources using hook_leaflet_geojson_source_info()


  • Leaflet GeoJSON got kickstarted while working on Geocluster.

Project Information