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.6.1 to 5.6.2

8

lib/stream-pyramid.js

@@ -13,2 +13,3 @@ var sm = new (require('sphericalmercator'))();

var util = require('util');
var validate = require('./tilelive.js').validate;

@@ -68,5 +69,8 @@ module.exports = Pyramid;

stream.bboxes = {};
var bounds = limitBounds(stream.bounds);
var boundsArray = limitBounds(stream.bounds);
var valid = validate({bounds:boundsArray});
if (valid instanceof Error) return stream.emit('error', new Error(valid.message));
for (var z = stream.minzoom; z <= stream.maxzoom; z++) {
stream.bboxes[z] = sm.xyz(bounds, z);
stream.bboxes[z] = sm.xyz(boundsArray, z);
stream.stats.total +=

@@ -73,0 +77,0 @@ (stream.bboxes[z].maxX - stream.bboxes[z].minX + 1) *

@@ -11,2 +11,3 @@ var sm = new (require('sphericalmercator'))();

var util = require('util');
var validate = require('./tilelive.js').validate;

@@ -56,5 +57,8 @@ module.exports = Scanline;

stream.bboxes = {};
var bounds = limitBounds(stream.bounds);
var boundsArray = limitBounds(stream.bounds);
var valid = validate({bounds:boundsArray});
if (valid instanceof Error) return stream.emit('error', new Error(valid.message));
for (var z = stream.minzoom; z <= stream.maxzoom; z++) {
stream.bboxes[z] = sm.xyz(bounds, z);
stream.bboxes[z] = sm.xyz(boundsArray, z);
stream.stats.total +=

@@ -61,0 +65,0 @@ (stream.bboxes[z].maxX - stream.bboxes[z].minX + 1) *

@@ -183,2 +183,3 @@ var tilelive = exports;

function isNumber(v) { return typeof v === 'number'; }
function validExtent(n) { return !isNaN(parseFloat(n)) && isFinite(n); }
for (var key in info) {

@@ -236,3 +237,3 @@ var val = info[key];

case 'bounds':
if (!Array.isArray(val) || val.length !== 4 || !val.every(isNumber))
if (!Array.isArray(val) || val.length !== 4 || !val.every(validExtent))
return new Error('bounds must be an array of the form [west, south, east, north]');

@@ -239,0 +240,0 @@ if (val[0] < -360 || val[0] > 360)

{
"name": "tilelive",
"version": "5.6.1",
"version": "5.6.2",
"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