Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Leaflet Maptiler

Security covered Under active development 41 sites

Part of the Leaflet ecosystem · 14 projects

This module integrates Maptiler maps with the Leaflet API. It allows you to display Maptiler maps as field formatters or within Views, and includes a submodule for generating map tokens.

The purpose of this module is to provide an integration with Maptiler maps using Leaflet API.

Installation

Before you enable the Leaflet Maptiler module, you need to download and enable
the Leaflet module and the Libraries module.

Download Leaflet javascript library (Drupal 7 only)

Download the Leaflet javascript library from http://leafletjs.com/download.html. Drop the unzipped folder in sites/all/libraries and rename it to leaflet, so that the path to the essential javascript file becomes: sites/all/libraries/leaflet/leaflet.js

Final steps

If all's ok, you won't see any errors in the Status Report admin/reports/status.

After this, all you have to do is enable Leaflet Maptiler to enhance your
mapping experience using maps from Maptiler.

Usage

You select the map when you format a single field (eg Geofield) as a
map or when you format a View (of multiple nodes or users) as a map. The module
"IP Geolocation Views and Maps" is particularly good for this.

You can configure Maptiler the following settings in admin/config/leaflet_maptiler:

  • Maptiler API Key: your API key generated from Maptiler
  • Maptiler layers: the default layers provided by Maptiler. Note that the first layer will be the base layer of all maps. Custom layers are not yet supported.
  • Geocoder external library: currently it uses the external leaflet-control-geocoder library in order to retrieve the geocoding information when the user clicks on a marker.

Extras

There is a submodule (Leaflet Maptiler Token) that comes with this module and provides a token in order to render a map without the need of using an iFrame.

To install this module we can simply enable it like any other module.

After a successful installation, the new token will be available and can be used according to the following set of properties (separated by '+' sign) [maptiler:lat_lng_zoom_height:<latitude>+<longitude>+<zoom>+<height>], where:

  • Latitude: a decimal number that represents the latitude where the marker will be positioned;
  • Longitude: a decimal number that represents the longitude where the marker will be positioned;
  • Zoom: an integer that represents the initial value of zoom when viewing the map;
  • Height: an integer that represents the height (in pixels) of the map.

Note that to use tokens on rich text you'll have to install and configure token_filter (https://www.drupal.org/project/token_filter)

Drupal 9–11

Ask your assistant about Leaflet Maptiler

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
8
Tracked since
Feb 2023
Latest release
6 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.2 Stable 9–11 May 17, 2026
2.0.1 Stable 9–11 May 17, 2026
2.0.0 Stable 9–10 Jun 19, 2024
2.x-dev Dev 9–11 Jun 19, 2024
8.x-1.0-beta13 Pre-release 8–10 Jun 19, 2024
8.x-1.0-beta12 Pre-release 8–10 Jul 13, 2023
8.x-1.0-beta11 Pre-release 8–10 Apr 21, 2023
8.x-1.0-beta10 Pre-release 8–10 Feb 7, 2023