mirror of
https://github.com/rastapasta/mapscii.git
synced 2025-04-15 20:18:15 +02:00
Ignore upstream issue: Unimplemented type: 4
This commit is contained in:
parent
b99f35a56d
commit
3f4bd472cf
15
src/Tile.js
15
src/Tile.js
@ -20,12 +20,23 @@ export default class Tile {
|
|||||||
|
|
||||||
async load(buffer) {
|
async load(buffer) {
|
||||||
const unzippedBuffer = await this._unzipIfNeeded(buffer);
|
const unzippedBuffer = await this._unzipIfNeeded(buffer);
|
||||||
await this._loadTile(unzippedBuffer);
|
this._loadTile(unzippedBuffer);
|
||||||
await this._loadLayers();
|
this._loadLayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
_loadTile(buffer) {
|
_loadTile(buffer) {
|
||||||
|
try {
|
||||||
this.tile = new VectorTile(new Protobuf(buffer));
|
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) {
|
_unzipIfNeeded(buffer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user