diff options
author | Christian Paul <info@jaller.de> | 2023-02-26 17:51:39 +0100 |
---|---|---|
committer | Christian Paul <info@jaller.de> | 2023-02-26 17:51:39 +0100 |
commit | 50294ac6337e8024f4ca3043833669544f9a211f (patch) | |
tree | 922de0bd7b0223eb317b81f04aacc7b2a087d305 | |
parent | 4fe9a60a0c9da952dadc5214a9ca5c68c447fdf8 (diff) |
Hide "Unimplemented type: 4" errorhide-type-4-error
-rw-r--r-- | src/Tile.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Tile.js b/src/Tile.js index ba207eb..d2d303f 100644 --- a/src/Tile.js +++ b/src/Tile.js @@ -30,7 +30,18 @@ class Tile { } _loadTile(buffer) { - this.tile = new VectorTile(new Protobuf(buffer)); + try { + this.tile = new VectorTile(new Protobuf(buffer)); + } catch (error) { + // Ignoring upstream issue https://github.com/rastapasta/mapscii/issues/87 + if (error.message === 'Unimplemented type: 4') { + this.tile = { + layers: [], + }; + return; + } + throw error; + } } _unzipIfNeeded(buffer) { |