Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Martin

No security coverage Under active development

Martin connects your Drupal site to a Martin tile server, the fast open source vector tile server from the MapLibre project, and lets you show its maps on your pages without writing any JavaScript.

Martin is a tile server written in Rust. It turns data stored in PostgreSQL/PostGIS, MBTiles, PMTiles and Cloud Optimized GeoTIFF files into map tiles on the fly, and it can also serve map styles, sprites and font glyphs. Martin runs as a separate service next to your website. This module is the bridge between the two: you tell Drupal where your Martin server is, the module reads the list of available layers from it, and you can place interactive MapLibre GL JS maps built from those layers anywhere on your site.

If you are new to web mapping: a "tile server" cuts a large map into small square pieces (tiles) and sends only the pieces the visitor is looking at. Vector tiles are drawn in the browser, so maps load fast, zoom smoothly and can be restyled without regenerating the data.

Features

  • Connect one or more Martin servers by entering their base URL.
  • Automatic discovery of tile sources, styles, sprites and fonts through Martin's /catalog endpoint, so you pick layers from a list instead of typing tile URLs.
  • Map blocks that can be placed in any region with the Block layout UI.
  • A field formatter for showing a Martin based map on entities.
  • Per map settings: center, zoom range, base style, visible layers and basic layer styling.
  • Rendering with MapLibre GL JS, the open source vector map library.
  • Works with every source type Martin supports: PostGIS tables and functions, MBTiles, PMTiles (local or remote) and Cloud Optimized GeoTIFF.

Typical use cases:

  • Publishing large spatial datasets (parcels, buildings, road networks, risk zones) that are too big to send to the browser as GeoJSON.
  • Showing live data from a PostGIS database on a Drupal site, where changes in the database appear on the map without exporting files.
  • Serving your own base maps from PMTiles or MBTiles files instead of relying on a commercial map provider or API key.
  • Municipal and institutional web GIS portals built on Drupal.

Post-Installation

  1. Make sure a Martin server is running and reachable from the visitor's browser (for example https://tiles.example.com). See the Martin documentation for installation.
  2. Go to Administration » Configuration » Web services » Martin and add your server's base URL.
  3. Save the form. The module reads the server's catalog and lists the available sources and styles.
  4. Create a map: either place a Martin map block in a region at Administration » Structure » Block layout, or select the Martin map formatter on a field under Manage display.
  5. Choose the layers, the starting view and the style for the map and save.

Things to keep in mind:

  • Tiles are requested by the visitor's browser directly from Martin, not through Drupal. Martin must therefore be publicly reachable, and CORS must allow requests from your site's domain.
  • Martin publishes what it is configured to publish. Drupal access control does not apply to the tiles themselves, so only expose data on Martin that may be shown publicly, or protect Martin with your own proxy or gateway.
  • After you add or remove sources on the Martin side, refresh the catalog from the module's settings page.

Additional Requirements

  • A running Martin tile server.
  • The MapLibre GL JS library (loaded from a CDN by default, or installed locally in the libraries folder).
  • No additional Drupal modules are required.
  • Geofield: store geometries in Drupal content. When the site uses PostgreSQL with PostGIS, the same data can be published by Martin.
  • Maputnik: a visual editor for MapLibre styles. Martin's own Web UI also includes it, which makes it easy to design styles for the maps you show in Drupal.

Similar projects

  • MapLibre GL: an API only integration of MapLibre GL JS with no user interface; maps are defined in code. This module provides a UI and is built specifically around Martin and its catalog.
  • Leaflet: a general purpose mapping module that can also show vector tiles through the MapLibre GL Leaflet plugin. It does not discover Martin sources; tile URLs have to be set up by hand.
  • Leaflet OpenFreeMap: adds the OpenFreeMap hosted vector styles to Leaflet. It uses a fixed external service, while this module works with your own Martin server and your own data.

Supporting this Module

Bug reports, feature requests, patches and merge requests are welcome in the issue queue. Testing with different Martin source types and configurations is especially helpful.

Community Documentation

Ask your assistant about Martin

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

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Oct 2026
Latest release
2 hours ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.0-alpha1 Pre-release 11 PHP 8.3 Oct 28, 2026
1.0.x-dev Dev 11 PHP 8.3 Oct 28, 2026