Expand description
WebAssembly bindings for the MapLibre Tile (MLT) format.
§Design
decodeTileColumns hands every layer to JS as typed arrays in one call, read
straight off mlt-core’s decoded columns. No per-layer or per-feature WASM objects are
kept alive, so nothing needs freeing, and JS walks the arrays with zero boundary crossings.
§Geometry
The vertex buffer is passed on as decoded: (x, y) pairs, or (x, y, z) triples when the
layer has z coordinates, as the v2 wire format interleaves them.
§Ids and properties
Each column is one value per feature with a presence bitmap beside it, rather than a
sentinel. 64-bit integers come out as f64, so values above Number.MAX_SAFE_INTEGER
lose precision.
§Annotate
annotateTile is the other entry point: it walks a tile into an AnnotatedTile
handle over its regions, for tooling that shows the wire format rather than the
decoded tile.
Functions§
- tile_
geojson - Decode a raw MLT tile blob into
GeoJSON, as the serialized text.