Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tilelive

Package Overview
Dependencies
Maintainers
22
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tilelive - npm Package Compare versions

Comparing version 5.3.0 to 5.3.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 5.3.1
* Job numbering starts with `0`
## 5.3.0

@@ -2,0 +6,0 @@

2

lib/stream-deserialize.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc