Comparing version 4.4.0 to 4.4.1
@@ -15,6 +15,17 @@ var fs = require('fs'); | ||
// TODO: don't read everything at once. | ||
this.list = unserialize(fs.readFileSync(options.list, 'utf8') | ||
this.list = []; | ||
var filelist = fs.readFileSync(options.list, 'utf8') | ||
.split('\n') | ||
.filter(function(line) { return line.trim().length; }) | ||
.map(function(line) { return JSON.parse(line); })); | ||
.filter(function(line) { return line.trim().length; }); | ||
if (/[\d]+\/[\d]+\/[\d]+/.test(filelist[0])) { | ||
for (var i = 0; i < filelist.length; i++) { | ||
var coords = filelist[i].split('/'); | ||
this.list.push(new Tile(+coords[0], +coords[1], +coords[2])); | ||
} | ||
} else { | ||
for (var i = 0; i < filelist.length; i++) { | ||
var state = JSON.parse(filelist[i]); | ||
this.list.push(new Tile(state.z, state.x, state.y, state.key)); | ||
} | ||
} | ||
@@ -21,0 +32,0 @@ this.stats = new Statistics(); |
{ | ||
"name" : "tilelive", | ||
"version" : "4.4.0", | ||
"version" : "4.4.1", | ||
"main" : "./lib/tilelive.js", | ||
@@ -5,0 +5,0 @@ "description" : "Frontend for various tile backends, mapnik and mbtiles", |
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
2248046
37
1938