Convert a PMTiles metadata decompression failure into an error response (#4399)

Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
bonesyjr
2026-07-14 19:53:32 -04:00
committed by GitHub
parent 6c55cef8b0
commit 07f8f33e52
6 changed files with 122 additions and 1 deletions

View File

@@ -1,5 +1,11 @@
# Changelog MapLibre Native for Android
## main
### 🐞 Bug fixes
- Convert a PMTiles metadata decompression failure into an error response instead of an uncaught exception ([#4399](https://github.com/maplibre/maplibre-native/pull/4399)).
## 13.3.1
### ✨ Features and improvements

View File

@@ -450,7 +450,14 @@ private:
std::string data = *responseMetadata.data;
if (header.internal_compression == pmtiles::COMPRESSION_GZIP) {
data = util::decompress(data);
try {
data = util::decompress(data);
} catch (const std::exception& e) {
callback(std::make_unique<Response::Error>(
Response::Error::Reason::Other,
std::string("Error decompressing PMTiles metadata: ") + e.what()));
return;
}
}
parse_callback(data);

View File

@@ -2,6 +2,10 @@
MapLibre welcomes participation and contributions from everyone. Please read [`MapLibre iOS Developer Guide`](https://maplibre.org/maplibre-native/docs/book/ios/index.html) to get started.
## main
- Convert a PMTiles metadata decompression failure into an error response instead of an uncaught exception ([#4399](https://github.com/maplibre/maplibre-native/pull/4399)).
## 6.27.0
- Implement ambient cache for PMTiles sources ([#4290](https://github.com/maplibre/maplibre-native/pull/4290)).