From 978ffd3b0906aa147d6e19fc4f53b4aa06aaaf7d Mon Sep 17 00:00:00 2001 From: Robin Hawkes Date: Tue, 29 Nov 2016 17:26:13 +0000 Subject: [PATCH] Add catches for tile errors --- src/layer/GeoJSONWorkerLayer.js | 4 +++- src/layer/tile/GeoJSONTile.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/layer/GeoJSONWorkerLayer.js b/src/layer/GeoJSONWorkerLayer.js index 1270265..ebb8190 100644 --- a/src/layer/GeoJSONWorkerLayer.js +++ b/src/layer/GeoJSONWorkerLayer.js @@ -49,7 +49,9 @@ class GeoJSONWorkerLayer extends Layer { } // Process GeoJSON - return this._process(this._geojson); + return this._process(this._geojson).catch((err) => { + console.error(err); + }); } // Use workers to request and process GeoJSON, returning data structure diff --git a/src/layer/tile/GeoJSONTile.js b/src/layer/tile/GeoJSONTile.js index e1813fe..1b2cbfa 100644 --- a/src/layer/tile/GeoJSONTile.js +++ b/src/layer/tile/GeoJSONTile.js @@ -349,7 +349,9 @@ class GeoJSONTile extends Tile { this._ready = true; // console.timeEnd(this._tile); - }).catch(() => {}); + }).catch((err) => { + console.error(err); + }); } _abortRequest() {