Skip to main content

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

From-v4.4

The MLTLoader dynamically loads MapLibre Tile (.mlt) data from URL based tile services.

SourceCharacteristic
File Extension.mlt
File TypeBinary Archive
File FormatMapLibre Tile
Data FormatArrow 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.

OptionTypeDefaultDescription
mlt.extensionstring.mltTile URL extension.
mlt.metadataUrlstring | nullnullOptional metadata URL override (tile.json by default is not assumed).
mlt.coordinates'wgs84' | 'local'wgs84Coordinates output from parsed tiles.
mlt.shape'geojson-table' | 'binary-geometry' | 'arrow'arrowReturned geometry shape.
geoarrow.encodingPreference'geoarrow.wkb' | 'geoarrow.geometry' | 'optimized'geoarrow.wkb for Arrow outputArrow geometry encoding preference.
mlt.layersstring[]N/AOptional 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.