From b058bdfd3cffd3fd2a8a417181b10529fc5eb76a Mon Sep 17 00:00:00 2001 From: Mjumbe Wawatu Ukweli Date: Thu, 24 Sep 2015 17:52:38 -0400 Subject: [PATCH 1/2] Modify the "load tile" worker to not treat a missing tile as an actual error --- js/source/worker.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/source/worker.js b/js/source/worker.js index 29ca0dce54a..2ce2bfe5779 100644 --- a/js/source/worker.js +++ b/js/source/worker.js @@ -44,6 +44,12 @@ util.extend(Worker.prototype, { function done(err, data) { delete this.loading[source][uid]; + // If the tile was not found, it's probably not acutally + // an error. There should be a better way of handing this + // though. + if (err && err.message === 'Not Found') return callback(); + + // Otherwise, treat it like an error. if (err) return callback(err); tile.data = new vt.VectorTile(new Protobuf(new Uint8Array(data))); From 46a9c1f01bda87d9af324b06610f95a52918d0f2 Mon Sep 17 00:00:00 2001 From: Lauren Ancona Date: Mon, 25 Jan 2016 01:16:23 -0500 Subject: [PATCH 2/2] spelling --- js/source/worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/source/worker.js b/js/source/worker.js index b7ff5db1760..3b126cab81d 100644 --- a/js/source/worker.js +++ b/js/source/worker.js @@ -44,7 +44,7 @@ util.extend(Worker.prototype, { function done(err, data) { delete this.loading[source][uid]; - // If the tile was not found, it's probably not acutally + // If the tile was not found, it's probably not actually // an error. There should be a better way of handing this // though. if (err && err.message === 'Not Found') return callback();