Comparing version 4.0.3 to 4.0.4
@@ -157,14 +157,2 @@ var tilelive = exports; | ||
if (ts.attributions) { | ||
if (!Array.isArray(ts.attributions)) { | ||
return new Error("Tilesource has invalid attributions: " + util.inspect(ts.attributions)); | ||
} | ||
for (var i = 0; i < ts.attributions.length; i++) { | ||
if (!ts.attributions[i].text) { | ||
return new Error("Tilesource has invalid attribution text: " + util.inspect(ts.attributions)); | ||
} | ||
// TODO: validate URLs | ||
} | ||
} | ||
if (ts.scheme !== 'xyz' && ts.scheme !== 'tms') { | ||
@@ -229,2 +217,8 @@ return new Error("Tilesource has invalid scheme: " + util.inspect(ts.scheme)); | ||
if (!Array.isArray(args.bbox) || args.bbox.length !== 4) throw new Error('bbox must have four lat/long coordinates'); | ||
if (args.bbox[0] < -180) throw new Error('bbox has invalid west value'); | ||
if (args.bbox[1] < -85.05112877980659) throw new Error('bbox has invalid north value'); | ||
if (args.bbox[2] > 180) throw new Error('bbox has invalid east value'); | ||
if (args.bbox[3] > 85.05112877980659) throw new Error('bbox has invalid north value'); | ||
if (args.bbox[0] > args.bbox[2]) throw new Error('bbox is invalid'); | ||
if (args.bbox[1] > args.bbox[3]) throw new Error('bbox is invalid'); | ||
if (typeof args.minZoom !== 'number') throw new Error('minZoom must be a number'); | ||
@@ -252,3 +246,3 @@ if (typeof args.maxZoom !== 'number') throw new Error('maxZoom must be a number'); | ||
for (var z = args.minZoom; z <= args.maxZoom; z++) { | ||
bounds[z] = sm.xyz(args.bbox, z, true); | ||
bounds[z] = sm.xyz(args.bbox, z); | ||
action.total += (bounds[z].maxX - bounds[z].minX + 1) * | ||
@@ -255,0 +249,0 @@ (bounds[z].maxY - bounds[z].minY + 1); |
{ | ||
"name" : "tilelive", | ||
"version" : "4.0.3", | ||
"version" : "4.0.4", | ||
"main" : "./lib/tilelive.js", | ||
@@ -5,0 +5,0 @@ "description" : "Frontend for various tile backends, mapnik and mbtiles", |
Sorry, the diff of this file is not supported yet
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
3654323
4467