MLT source loader
Fetch compact vector tiles through a source.
MLTLoader connects URL-addressed MapLibre Tile services to the loaders.gl source API. It resolves tile URLs, decodes MLT payloads, and returns Arrow tables with GeoArrow geometry by default.
The MLT source boundary
Keep tile addressing separate from tile decoding.
The source owns service URLs and metadata, while `MLTLoader` owns the compact binary payload. Applications can request tiles through the common source lifecycle.
Input
Tile service URL and optional metadata URL
Addressing
z/x/y tile coordinates with configurable extension
Decode
MLT layers, attributes, and geometry
Output
Arrow table with GeoArrow geometry by default
The MLTLoader dynamically loads MapLibre Tile (.mlt) data from URL based tile services.
| Source | Characteristic |
|---|---|
| File Extension | .mlt |
| File Type | Binary Archive |
| File Format | MapLibre Tile |
| Data Format | Arrow with GeoArrow, GeoJSON, or binary geometry |
Usage
Detailed guide
Source options and output details
The reference below documents construction, URL and metadata options, coordinate output, layer filtering, and related loader APIs.
import {createDataSource} from '@loaders.gl/core';
import {MLTLoader} from '@loaders.gl/tiles/mlt';
const source = await createDataSource('https://example.com/tiles', [MLTLoader]);
const arrowTable = await source.getTile({x: 0, y: 0, z: 0});
Options
For shared loading controls and parser configuration, see Source options. The settings below are specific to this source.
| Option | Type | Default | Description |
|---|---|---|---|
mlt.extension | string | .mlt | Tile URL extension. |
mlt.metadataUrl | string | null | null | Optional metadata URL override (tile.json by default is not assumed). |
mlt.coordinates | 'wgs84' | 'local' | wgs84 | Coordinates output from parsed tiles. |
mlt.shape | 'geojson-table' | 'binary-geometry' | 'arrow' | arrow | Returned geometry shape. |
geoarrow.encodingPreference | 'geoarrow.wkb' | 'geoarrow.geometry' | 'optimized' | geoarrow.wkb for Arrow output | Arrow geometry encoding preference. |
mlt.layers | string[] | N/A | Optional layer filter before decoding geometry. |
Additional references
Attribution
MLTLoader fetches URL-addressed MLT tiles and parses them via MLTLoader, which uses the @maplibre/mlt decoder implementation.