Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let package = Package(
targets: ["MVTTools"]),
],
dependencies: [
.package(url: "https://github.com/Outdooractive/gis-tools", from: "2.2.0"),
.package(url: "https://github.com/Outdooractive/gis-tools", from: "2.2.1"),
.package(url: "https://github.com/Outdooractive/gis-tools-geopackage", from: "1.0.2"),
.package(url: "https://github.com/Outdooractive/gis-tools-gpx", from: "1.0.4"),
.package(url: "https://github.com/Outdooractive/gis-tools-fit", from: "1.0.0"),
Expand Down
10 changes: 9 additions & 1 deletion Sources/CMLT/Bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,15 @@ uint8_t* mlt_encoder_finish(
state->currentFeatures.clear();
state->currentLayerName.clear();
}
auto result = state->encoder.encode(state->layers, mlt::EncoderConfig::with([](auto& c) { c.useFsst = true; }));
// FSST string compression must stay disabled here. The C++ MLT encoder
// trains its own FSST dictionary, which is binary-incompatible with the
// Rust/WASM FSST decoder used by maplibre-gl-js. With FSST enabled,
// string properties (e.g. "name_en", "type") are corrupted on the JS side
// in a content-dependent way, silently dropping features whose style
// filters compare those strings. Do NOT re-enable this setting without
// first verifying round-trip decoding against the maplibre-gl-js WASM
// decoder across a representative set of tiles.
auto result = state->encoder.encode(state->layers, mlt::EncoderConfig::with([](auto& c) { c.useFsst = false; }));
auto* buffer = static_cast<uint8_t*>(std::malloc(result.size()));
std::memcpy(buffer, result.data(), result.size());
*outLength = result.size();
Expand Down
Loading