Comparing version 0.5.1 to 0.5.2
@@ -135,4 +135,5 @@ // a tile is an array [x,y,z] | ||
var z = getBboxZoom(bbox); | ||
var x = bbox[0] >> (32 - z); | ||
var y = bbox[1] >> (32 - z); | ||
if (z === 0) return [0,0,0]; | ||
var x = bbox[0] >>> (32 - z); | ||
var y = bbox[1] >>> (32 - z); | ||
return [x,y,z]; | ||
@@ -139,0 +140,0 @@ } |
{ | ||
"name": "tilebelt", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "simple tile utilities", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
10
test.js
@@ -142,1 +142,11 @@ var test = require('tape'), | ||
}); | ||
test('bbox to tile -- crossing 0 lat/lng', function(t) { | ||
var bbox = [-10, -10, 10, 10]; | ||
var tile = tilebelt.bboxToTile(bbox); | ||
t.ok(tile, 'convert bbox to tile'); | ||
t.equal(tile[0], 0); | ||
t.equal(tile[1], 0); | ||
t.equal(tile[2], 0); | ||
t.end(); | ||
}); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
11250
276
1