Comparing version 5.3.0 to 5.3.1
@@ -0,1 +1,5 @@ | ||
## 5.3.1 | ||
* Job numbering starts with `0` | ||
## 5.3.0 | ||
@@ -2,0 +6,0 @@ |
@@ -51,3 +51,3 @@ var stream = require('stream'); | ||
var x = deserialize(serializedObj, 'x'); | ||
if (x % this._job.total !== this._job.num - 1) | ||
if (x % this._job.total !== this._job.num) | ||
return; | ||
@@ -54,0 +54,0 @@ } |
@@ -35,15 +35,26 @@ var sm = new (require('sphericalmercator'))(); | ||
this.buffer += obj.toString('utf8'); | ||
var next = this.buffer.indexOf('\n'); | ||
while (next !== -1) { | ||
var coord = this.buffer.substr(0, next).split('/'); | ||
var list = this; | ||
function pushTile(str) { | ||
var coord = str.split('/'); | ||
var z = parseInt(coord[0],10); | ||
var x = parseInt(coord[1],10); | ||
var y = parseInt(coord[2],10); | ||
this.buffer = this.buffer.substr(next + 1); | ||
if (isNaN(z) || isNaN(x) || isNaN(y)) break; | ||
this.bufferzxy.push({z:z,x:x,y:y}); | ||
this.stats.total++; | ||
this.length++; | ||
next = this.buffer.indexOf('\n'); | ||
if (isNaN(z) || isNaN(x) || isNaN(y)) return false; | ||
list.bufferzxy.push({z:z,x:x,y:y}); | ||
list.stats.total++; | ||
list.length++; | ||
return true; | ||
} | ||
while (this.buffer.length) { | ||
var next = this.buffer.indexOf('\n'); | ||
if (next === -1) next = this.buffer.length; | ||
if (pushTile(this.buffer.slice(0, next))) | ||
this.buffer = this.buffer.slice(next + 1); | ||
else break; | ||
} | ||
this.emit('length', this.length); | ||
@@ -65,3 +76,3 @@ callback(); | ||
if (stream.job && zxy.x % stream.job.total !== stream.job.num - 1) | ||
if (stream.job && zxy.x % stream.job.total !== stream.job.num) | ||
return skip(); | ||
@@ -68,0 +79,0 @@ |
@@ -56,5 +56,5 @@ var sm = new (require('sphericalmercator'))(); | ||
stream.bounds = [ | ||
stream.bounds[0] + (stream.job.num - 1) * dx, | ||
stream.bounds[0] + stream.job.num * dx, | ||
stream.bounds[1], | ||
stream.bounds[0] + stream.job.num * dx, | ||
stream.bounds[0] + (stream.job.num + 1) * dx, | ||
stream.bounds[3] | ||
@@ -61,0 +61,0 @@ ]; |
@@ -88,3 +88,3 @@ var sm = new (require('sphericalmercator'))(); | ||
if (stream.job && x % stream.job.total !== stream.job.num - 1) | ||
if (stream.job && x % stream.job.total !== stream.job.num) | ||
return skip(); | ||
@@ -91,0 +91,0 @@ |
{ | ||
"name": "tilelive", | ||
"version": "5.3.0", | ||
"version": "5.3.1", | ||
"main": "./lib/tilelive.js", | ||
@@ -5,0 +5,0 @@ "description": "API for various map tile backends", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
55778
959
0