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

colonel-mercator

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colonel-mercator - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

19

lib/merc_res.js

@@ -33,21 +33,16 @@ var r_utils = require('mapnik-omnivore/lib/utils');

breakZooms = breakZooms.map(function(z) {
var breakZ = Math.min(z + upzoom, validSpatRef.length - 1);
return {
breakZ: breakZ,
z: z,
thresh: validSpatRef[Math.min(z + upzoom, validSpatRef.length - 1)]
thresh: validSpatRef[breakZ]
}
});
var minThresh = breakZooms[breakZooms.length -1]
breakZooms = breakZooms.filter(function(r) {
if (resolution < r.thresh) {
return r
}
breakZooms = breakZooms.filter(function(r, l) {
// Return if last OR if resolution is under the threshold AND if the next break has a different break
return l === breakZooms.length - 1 || resolution < r.thresh && r.breakZ !== breakZooms[l + 1].breakZ;
});
if (breakZooms.length) {
return callback(null, breakZooms[0]);
} else {
return callback(null, minThresh);
}
return callback(null, breakZooms[0]);
}
{
"name": "colonel-mercator",
"version": "0.1.1",
"version": "0.2.0",
"main": "./index",

@@ -16,3 +16,3 @@ "engines": {

"dependencies": {
"mapnik-omnivore": "^7.0.0",
"mapnik-omnivore": "^7.4.0",
"minimist": "^1.1.0",

@@ -19,0 +19,0 @@ "split": "^0.3.3"

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